Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

Commit

Permalink
(FACT-2632) Log error message if we encounter exceptions while loadin…
Browse files Browse the repository at this point in the history
…g custom facts files (#528)

* (FACT-2632) Log error message if we encounter exceptions while loading custom facts files.
* (FACT-2632) Move exception caching in load_file.
  • Loading branch information
Bogdan Irimie authored May 21, 2020
1 parent 865229d commit 41d0168
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/custom_facts/util/loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ def load_file(file)
# in case it's loadable later on.
@loaded.delete(file)
Facter.log_exception(e, "Error loading fact #{file}: #{e.message}")
rescue StandardError => e
Facter.log_exception(e, "error while resolving custom facts in #{file} #{e.message}")
end
end

Expand Down

0 comments on commit 41d0168

Please sign in to comment.