[Dancer-users] Handling errors: Best Practices for Module extensions and Plugins

damien krotkine dkrotkine at gmail.com
Wed Dec 15 17:18:28 CET 2010


I personnally prefer croak to die, and carp to warn.  Ideally, I would croak
a instance of a dedicated Dancer error class ?
Something inspired by this :
http://advent.rjbs.manxome.org/2010/2010-12-03.html

Originally, Dancer was using warn and die, and I introduced some croak and
carp calls. My evil plan was that it would extend itself to any Dancer core
and plugin code, but I didn't explicitely pushed anything.

The call has to be made by $designer I guess :)


On 15 December 2010 16:41, Gurunandan Bhat <gbhat at pobox.com> wrote:

> I have seen plugins and modules that extend the core (Dancer::Session::X
> for instance) handle fatal errors in diverse ways: die and croak for one.
> Are there best practices for die'ing from a use'd module or plugin?
>
> Thank you
>
>
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20101215/ce201ad9/attachment-0001.htm>


More information about the Dancer-users mailing list