[Dancer-users] Handling errors: Best Practices for Module extensions and Plugins
sawyer x
xsawyerx at gmail.com
Wed Dec 15 17:47:17 CET 2010
Theoretically in library code (this includes both plugins and Dancer itself,
since it's a web-related DSL library, in essence) should use Carp's croak()
and carp() in order to give the user (whoever is using Dancer or a specific
plugin) with the correct line that was run that triggered the internal
error.
That means, theoretically, that all die()s and warn()s should be croak()s
and carp()s.
If you found any instances in which die() or warn() were used, it would be
big (as in "kind and helpful") of you to contact the author (even us :) and
tell them it exists and should probably be changed.
The reason I said "theoretically" earlier is that perhaps a specific author
would give you a compelling reason why they wanted die() instead of croak().
Perhaps they know something you or I don't.
Sawyer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20101215/1db9dc3a/attachment.htm>
More information about the Dancer-users
mailing list