I don't think you can call onError() directly, as it only exists at the application level (just like you can't call onRequest() or other methods outside of Application.cfc). Also, onError() only traps runtime errors, not compilation errors. Leaving a tag unclosed is a syntax error that is thrown during compliation, not during runtime. Instead, to test onError() try referencing a variable that doesn't exist or executing a built-in function with invalid parameters.
-Carl V.