NAME
Perl::Critic::Policy::TryTiny::RequireCatch - Always include a "catch" block when using "try"
VERSION
version 0.002
DESCRIPTION
Programmers from other programming languages may assume that the following code does not swallow exceptions:
use Try::Tiny;
try {
# ...
}
finally {
# ...
};
However, Try::Tiny's implementation always swallows exceptions unless a catch block has been specified.
The programmer should always include a catch block. The block may be empty, to indicate that exceptions are deliberately ignored.
use Try::Tiny;
try {
# ...
}
catch {
# ...
}
finally {
# ...
};
CONFIGURATION
This Policy is not configurable except for the standard options.
KNOWN BUGS
This policy assumes that Try::Tiny is being used, and it doesn't run if it can't find it being imported.
AUTHOR
David D Lowe <flimm@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2015 by Lokku <cpan@lokku.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.