From 5834b490b8f426e2bbdec7d0b41459e09fdfb82a Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Thu, 1 Mar 2012 18:09:22 +0100 Subject: [snmp/agent] Add dir listing to error reason Add dir listing to error reason when failing to read mandatory config file standard.conf. OTP-9943 --- lib/snmp/src/agent/snmp_standard_mib.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/snmp/src') diff --git a/lib/snmp/src/agent/snmp_standard_mib.erl b/lib/snmp/src/agent/snmp_standard_mib.erl index 7db94e7bd5..7c78e03b3b 100644 --- a/lib/snmp/src/agent/snmp_standard_mib.erl +++ b/lib/snmp/src/agent/snmp_standard_mib.erl @@ -155,7 +155,8 @@ read_standard(Dir) -> FileName = "standard.conf", Gen = fun(D, Reason) -> throw({error, {failed_reading_config_file, - D, FileName, Reason}}) + D, FileName, + file:list_dir(Dir), Reason}}) end, Filter = fun(Standard) -> sort_standard(Standard) end, Check = fun(Entry) -> check_standard(Entry) end, @@ -595,4 +596,4 @@ error(Reason) -> throw({error, Reason}). config_err(F, A) -> - snmpa_error:config_err("[STANDARD-MIB]: " ++ F, A). + snmpa_error:config_err("[STANDARD-MIB] " ++ F, A). -- cgit v1.2.3