Calling a 'server-side' function in Google App Script can be achieved with:
google.script.run.withFailureHandler(CallbackFailure)
.withSuccessHandler(CallbackSuccess).doSomething();
In Code.gs, how can I ensure CallbackFailure is called? I attempted:
function doSomething() {
throw new Error( "Trigger CallbackFailure" );
}
However I receive an error because of an unhandled exception. I had hoped throwing an Error would call CallbackFailure - but it was just guess work and doesn't work.