I'm trying to get more information for when google.script.run
fails. I know that I can get a basic error handling callback function to give me the error message with something like this:
google.script.run.withFailureHandler(handleError).getMe();
Where handleError
gets an argument passed in for the error message.
function handleError(error) {
console.log(error);
}
However, if I wanted to created a custom error handler that provided the location of where the exception was being thrown, I could use a custom function on withFailureHandler
, like this:
google.script.run.withFailureHandler(function () {
showError(error, 'getMe');
}).getMe();
With this method I'm stumped with one issue. How do I capture the error message to pass to my showError()
error handler?