1 PACKAGE BODY FA_STANDARD_PKG as
2 /* $Header: faxsrvrb.pls 120.2 2005/07/25 09:59:46 yyoon noship $ */
3
4 procedure raise_error( called_fn in varchar2,
5 calling_fn in varchar2,
6 name in varchar2 default null,
7 token1 in varchar2 default null,
8 value1 in varchar2 default null,
9 token2 in varchar2 default null,
10 value2 in varchar2 default null,
11 token3 in varchar2 default null,
12 value3 in varchar2 default null,
13 translate in boolean default FALSE,
14 p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) is
15 L_err_num number default 0;
16 begin
17 L_err_num := SQLCODE;
18 if L_err_num = -20001 then
19 app_exception.raise_exception;
20 elsif L_err_num = -20000 then
21 raise_application_error(-20000, SQLERRM);
22 end if;
23
24 if name is NULL then
25 fnd_message.set_name('OFA', 'FA_SHARED_SERVER_ERROR');
26 if fnd_profile.value('PRINT_DEBUG') = 'Y' then
27 fnd_message.set_token('CALLED_FN', called_fn);
28 fnd_message.set_token('CALLING_FN', calling_fn);
29 fnd_message.set_token('SQLERRM', SUBSTR(SQLERRM, 1, 100));
30 end if;
31 app_exception.raise_exception;
32 return;
33 end if;
34
35 fnd_message.set_name('OFA', name);
36 if fnd_profile.value('PRINT_DEBUG') = 'Y' then
37 fnd_message.set_token('CALLED_FN', called_fn);
38 fnd_message.set_token('CALLING_FN', calling_fn);
39 end if;
40 if (token1 is not null) then
41 fnd_message.set_token(token1, value1, translate);
42 end if;
43 if (token2 is not null) then
44 fnd_message.set_token(token2, value2, translate);
45 end if;
46 if (token3 is not null) then
47 fnd_message.set_token(token3, value3, translate);
48 end if;
49 app_exception.raise_exception;
50 end raise_error;
51
52 END FA_STANDARD_PKG;