How to handle exceptions gracefully in Dancer2?
All, I am new to Dancer/Dancer2 and to the list. I have an application that makes some db calls and some rest calls to another site, and of course those can fail. I'd like to handle those gracefully. Can I use Dancer::Exception in Dancer2? Should I just croak? Or is there something else. I could not find a Dancer2::Exception. Thanks, --john -- John J. McDermott, CPLP
Hi John, this doesn't work? http://search.cpan.org/~yanick/Dancer-1.3124/lib/Dancer/Exception.pm On Sun, Jul 27, 2014 at 8:06 PM, John J. McDermott, CPLP <jjm@jkintl.com> wrote:
All, I am new to Dancer/Dancer2 and to the list. I have an application that makes some db calls and some rest calls to another site, and of course those can fail. I'd like to handle those gracefully. Can I use Dancer::Exception in Dancer2? Should I just croak? Or is there something else. I could not find a Dancer2::Exception.
Thanks, --john -- John J. McDermott, CPLP _______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
Thanks for the fast reply. I wanted to avoid a lot of testing if it didn't. Can I generally use Dancer modules in Dancer2? --john On 7/27/2014 1:17 PM, fabioniguel3@gmail.com wrote:
Hi John, this doesn't work?
http://search.cpan.org/~yanick/Dancer-1.3124/lib/Dancer/Exception.pm <http://search.cpan.org/%7Eyanick/Dancer-1.3124/lib/Dancer/Exception.pm>
On Sun, Jul 27, 2014 at 8:06 PM, John J. McDermott, CPLP <jjm@jkintl.com <mailto:jjm@jkintl.com>> wrote:
All, I am new to Dancer/Dancer2 and to the list. I have an application that makes some db calls and some rest calls to another site, and of course those can fail. I'd like to handle those gracefully. Can I use Dancer::Exception in Dancer2? Should I just croak? Or is there something else. I could not find a Dancer2::Exception.
Thanks, --john -- John J. McDermott, CPLP _______________________________________________ dancer-users mailing list dancer-users@dancer.pm <mailto:dancer-users@dancer.pm> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-- John J. McDermott, CPLP Learning and Performance Consultant jjm at jkintl.com 575/737-8556 Check out my security blog posts <http://cybersecurity.learningtree.com> Add an A for the Arts To STEM and get STEAM and a strong engine to move forward.
participants (2)
-
fabioniguel3@gmail.com -
John J. McDermott, CPLP