PerlDancer/Dancer2 — pull request #297 by franckcuny (2013-07-07 22:52:04+00:00)
Title: Check 'show_errors' when returning an internal error.

When returning an internal error, exceptions should not be returned in
the response if the value of 'show_errors' is set to false in the
configuration.

In order to do this, instead of passing the message and the exception as
a single value to Dancer2::Core::Error, we separate them and use the
correct attribute when creating the object.

When the method `throw` is called, the value of 'show_errors' is
checked, and if it's false, the exception is not used in the message.

Tests are updated accordingly to this change.

Closes #216