Unhandled exceptions in Google Apps Script

Viewed 53411

I have created a public Web App with access to my private spreadsheet data. I can catch and log exceptions intry..catch, but:

  1. is it possible to catch all unhandled exceptions, like browsers window.onerror?
  2. can I view logs of unhandled exceptions somewhere?
  3. by exceptions like "Service invoked too many times" my app is even not getting run, so here I definitely can`t handle the exceptions. Is there logs with such kind of exceptions?

These are so simple questions, so that I'm bit confused to ask them, but after hours of research I could not find the answers.

Thank you in advance.

2 Answers

Try/catch at global scope will work, however any let/const container will not be globally exposed.

To fix this, you can use var within the try/catch at global scope

Related