I have an google app script for Google Sheets. Recently I came across "Script runtime" limitations when my function was inserting data into a spreadsheet over 6 min. My modal window just hung and in the Dev Console I got “Exceeded maximum execution time”.
After some researching I figured how to re-implement my function so it would execute in batches and less likely hit the limit.
However, at this point I would like add some logic to my script which could centralized catch this limitation and all other possible and simply show some error message to a user in comparison just hanging and doing nothing.
Are there any approaches to accomplish that ?