Can I use something like die () (in php) in an Apps Script application? I considered this issue, the most acceptable solution is to throw a new error, but in this case I do not want to receive a Script crash notification (since I'm not the only one who receives them).
I just want to finish the script.
You can stop the function that currently works with return . But this will not stop the function, which is called the function with return in it.
return
Mozilla Developer Documentation - JavaScript
There are situations where you should use break instead of return .
break
Documentation - Break
Then there are also throw and try, catch , which you should be aware of.
throw
try, catch
quit documentation - JavaScript
If the code in the try block has an error, it will not kill your program, it will stop the execution of only what is in the try block.
try
Try catch
Source: https://habr.com/ru/post/1209697/More articles:How to firebase.push in Clojurescript? Is my data correct? - javascriptHow to use pixel shaders to achieve smooth text? - javaSet working directory for function arguments - bashHow to text index in mongodb using nodejs - node.jsABAP is written to a popup - sapSIGTRAP error in iOS - AutoreleasePoolPage :: busted - iosHow to stop a google script application from an infinite loop that always runs when a Google Spreadsheet document is opened? - javascriptTravis Verification Warning - javaCreating a custom context menu when choosing text in WebView - androidAndroid Play Store - error receiving information from the server. RPC: S-2: AEC-2 - androidAll Articles