Wrap a script's main function with crash handling. On uncaught errors, appends to _crash.log in crashDir and exits.
_crash.log
crashDir
Script identifier for the crash log.
Main function to execute (sync or async).
Directory for crash logs (default: current working directory).
Wrap a script's main function with crash handling. On uncaught errors, appends to
_crash.logincrashDirand exits.