letUncaughtExceptionsEscape property Null safety
Whether or not to allow uncaught exceptions escape request controllers.
When this value is false - the default - all Controller instances handle unexpected exceptions by catching and logging them, and then returning a 500 error.
While running tests, it is useful to know where unexpected exceptions come from because they are an error in your code. By setting this value to true, all Controllers will rethrow unexpected exceptions in addition to the base behavior. This allows the stack trace of the unexpected exception to appear in test results and halt the tests with failure.
By default, this value is false. Do not set this value to true outside of tests.
static bool letUncaughtExceptionsEscape = false;