diff options
author | Micael Karlberg <[email protected]> | 2012-03-01 18:09:22 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2012-03-01 18:09:22 +0100 |
commit | 5834b490b8f426e2bbdec7d0b41459e09fdfb82a (patch) | |
tree | 51f22298699aad34cc5ba6ab4a0143a7cde7c748 /lib | |
parent | d11e013575ed400b7167342be4b08ba3d1166ee9 (diff) | |
download | otp-5834b490b8f426e2bbdec7d0b41459e09fdfb82a.tar.gz otp-5834b490b8f426e2bbdec7d0b41459e09fdfb82a.tar.bz2 otp-5834b490b8f426e2bbdec7d0b41459e09fdfb82a.zip |
[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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/snmp/src/agent/snmp_standard_mib.erl | 5 |
1 files changed, 3 insertions, 2 deletions
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). |