~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/snmp/src/agent/snmpa_error_io.erl

  • Committer: Bazaar Package Importer
  • Author(s): Erlang Packagers, Sergei Golovan
  • Date: 2006-12-03 17:07:44 UTC
  • mfrom: (2.1.11 feisty)
  • Revision ID: james.westby@ubuntu.com-20061203170744-rghjwupacqlzs6kv
Tags: 1:11.b.2-4
[ Sergei Golovan ]
Fixed erlang-base and erlang-base-hipe prerm scripts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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/.
 
6
%% 
 
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
 
10
%% under the License.
 
11
%% 
 
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.''
 
15
%% 
 
16
%%     $Id$
 
17
%%
 
18
-module(snmpa_error_io).
 
19
 
 
20
-behaviour(snmpa_error_report).
 
21
 
 
22
 
 
23
%%%-----------------------------------------------------------------
 
24
%%% Implements different error mechanisms.
 
25
%%%-----------------------------------------------------------------
 
26
-export([user_err/2, config_err/2]).
 
27
 
 
28
 
 
29
%%-----------------------------------------------------------------
 
30
%% This function is called when there is an error in a user
 
31
%% supplied item, e.g. instrumentation function.
 
32
%%-----------------------------------------------------------------
 
33
user_err(F, A) -> 
 
34
    error_msg("User error", F, A).
 
35
 
 
36
 
 
37
%%-----------------------------------------------------------------
 
38
%% This function is called when there is a configuration error,
 
39
%% either at startup (in a conf-file) or at run-time (e.g. when 
 
40
%% information in the configuration tables are inconsistent.)
 
41
%%-----------------------------------------------------------------
 
42
config_err(F, A) ->
 
43
    error_msg("Configuration error", F, A).
 
44
 
 
45
 
 
46
error_msg(P, F, A) ->
 
47
    io:format("*** SNMP ~s *** ~n" ++ F ++ "~n", [P|A]).
 
48