aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/agent
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2012-03-05 14:07:35 +0100
committerMicael Karlberg <[email protected]>2012-03-05 14:07:35 +0100
commitc5a16ad3551a87a9bb361a8bce220cb849247d43 (patch)
tree27986dd81b336a2526c49c97f73488fe64648736 /lib/snmp/src/agent
parent5834b490b8f426e2bbdec7d0b41459e09fdfb82a (diff)
downloadotp-c5a16ad3551a87a9bb361a8bce220cb849247d43.tar.gz
otp-c5a16ad3551a87a9bb361a8bce220cb849247d43.tar.bz2
otp-c5a16ad3551a87a9bb361a8bce220cb849247d43.zip
[snmp/agent] Some minor improvements to the error messages
OTP-9943
Diffstat (limited to 'lib/snmp/src/agent')
-rw-r--r--lib/snmp/src/agent/snmp_standard_mib.erl10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/snmp/src/agent/snmp_standard_mib.erl b/lib/snmp/src/agent/snmp_standard_mib.erl
index 7c78e03b3b..ca93546923 100644
--- a/lib/snmp/src/agent/snmp_standard_mib.erl
+++ b/lib/snmp/src/agent/snmp_standard_mib.erl
@@ -156,7 +156,7 @@ read_standard(Dir) ->
Gen = fun(D, Reason) ->
throw({error, {failed_reading_config_file,
D, FileName,
- file:list_dir(Dir), Reason}})
+ list_dir(Dir), Reason}})
end,
Filter = fun(Standard) -> sort_standard(Standard) end,
Check = fun(Entry) -> check_standard(Entry) end,
@@ -164,6 +164,14 @@ read_standard(Dir) ->
snmp_conf:read_files(Dir, [{Gen, Filter, Check, FileName}]),
Standard.
+list_dir(Dir) ->
+ case file:list_dir(Dir) of
+ {ok, Files} ->
+ Files;
+ Error ->
+ Error
+ end.
+
%%-----------------------------------------------------------------
%% Make sure that each mandatory standard attribute is present, and