1
%% ``The contents of this file are subject to the Erlang Public License,
2
%% Version 1.1, (the "License"); you may not use this file except in
3
%% compliance with the License. You should have received a copy of the
4
%% Erlang Public License along with this software. If not, it can be
5
%% retrieved via the world wide web at http://www.erlang.org/.
7
%% Software distributed under the License is distributed on an "AS IS"
8
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
9
%% the License for the specific language governing rights and limitations
12
%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
13
%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
14
%% AB. All Rights Reserved.''
20
%%%-----------------------------------------------------------------
21
%%% Implements different error mechanisms.
22
%%%-----------------------------------------------------------------
23
-export([user_err/2, config_err/2]).
26
%%-----------------------------------------------------------------
27
%% This function is called when there is an error in a user
28
%% supplied item, e.g. instrumentation function.
29
%%-----------------------------------------------------------------
31
error_msg("** User error: ", F, A).
34
%%-----------------------------------------------------------------
35
%% This function is called when there is a configuration error,
36
%% either at startup (in a conf-file) or at run-time (e.g. when
37
%% information in the configuration tables are inconsistent.)
38
%%-----------------------------------------------------------------
40
error_msg("** Configuration error: ", F, A).
44
S = snmp_misc:format(1024, lists:concat([P, F, "\n"]), A),
45
catch error_logger:error_msg("~s", [S]).