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

(FACT-2632) Log error message if we encounter exceptions while loading custom facts files #528

Merged
merged 2 commits into from
May 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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