letUncaughtExceptionsEscape property

bool letUncaughtExceptionsEscape
read / write

Whether or not to allow uncaught exceptions escape request controllers.

When this value is false - the default - all RequestController 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 RequestControllers 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.

Implementation

static bool letUncaughtExceptionsEscape = false