[Dancer-users] Dancer::Test and negative testing, error reporting
Rudolf Muehlbauer
rudolf.muehlbauer at gmail.com
Sun Mar 6 01:44:06 CET 2011
Dear List,
I casually use `die` inside my handlers to report errors.
This works ok when i use the application with the browser.
The `die`s are translated to HTTP 500, the error is reported to the
user.
Now my problem:
I want to test corner-cases in my Dancer::Test cases. But in the
test-cases, my `die`s are not translated to HTTP 500, instead the test
dies "Dubiously".
Is there a way to get Dancer::Test to behave like Dancer w/o Test?
I really don't want to `eval` all my tests - set aside that this would
also not allow me to test for HTTP 500.
Alternatively, how should error reporting happen without `die`? I miss
my structured exception handling...
Any help greatly appreciated,
--
Rudolf Muehlbauer <rudolf.muehlbauer at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20110306/04f14a79/attachment.pgp>
More information about the Dancer-users
mailing list