Skip to content

Commit

Permalink
Use proper exception code
Browse files Browse the repository at this point in the history
  • Loading branch information
cosimo committed Nov 23, 2010
1 parent 2617195 commit 10821b6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/Facter/Util/Loader.pm
Expand Up @@ -16,11 +16,13 @@ method load($fact) {
# TODO: would be cool to also run the ".rb" facts
my $filename = $shortname ~ ".pm";
my $module = "Facter::$shortname";
require $module;
# or do {
# warn "Unable to load fact $shortname: $!";
# return False;
#};
try {
require $module;
CATCH {
warn "Unable to load fact $shortname: $!";
return False;
}
}

return True;

Expand Down

0 comments on commit 10821b6

Please sign in to comment.