When one of my Dancer (1) JSON-enabled routes dies, I get an object back that
looks like this:
{
"exception" : "some text here",
"error" : "some text here"
}
Recently, I accidentally added a "die" statement with a parameter that wasn't a
scalar. (Spoiler: it was a hashref.) I
was surprised to see this:
{
"exception" : {
"state_iso_code" : "'(undef)' not a US state or province'",
"address" : "blank"
},
"error" : "HASH(0x731ce28)"
}
Woo, that's pretty cool, I thought. I can use that. But how the heck did I do
that? I'd like to have a bit more control,
like supplying a general "your form failed" message instead of the "HASH()"
stringified value.
I searched the code base, but as you may expect, "exception" and "error" are
grep-proof strings to some extent.
--
Jeff Boes <><
[email protected]
269-408-0811
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users