1 PACKAGE BODY FA_STANDARD_PKG as
2 /* $Header: faxsrvrb.pls 120.3 2009/03/27 05:05:36 bridgway ship $ */
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, p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) is
14 L_err_num number default 0;
15 begin
16 L_err_num := SQLCODE;
17 if L_err_num = -20001 then
18 app_exception.raise_exception;
19 elsif L_err_num = -20000 then
20 raise_application_error(-20000, SQLERRM);
21 end if;
22
23 if name is NULL then
24 fnd_message.set_name('OFA', 'FA_SHARED_SERVER_ERROR');
25 if fnd_profile.value('PRINT_DEBUG') = 'Y' then
26 fnd_message.set_token('CALLED_FN', called_fn);
27 fnd_message.set_token('CALLING_FN', calling_fn);
28 fnd_message.set_token('SQLERRM', SUBSTR(SQLERRM, 1, 100));
29 end if;
30 app_exception.raise_exception;
31 return;
32 end if;
33
34 fnd_message.set_name('OFA', name);
35 if fnd_profile.value('PRINT_DEBUG') = 'Y' then
36 fnd_message.set_token('CALLED_FN', called_fn);
37 fnd_message.set_token('CALLING_FN', calling_fn);
38 end if;
39 if (token1 is not null) then
40 fnd_message.set_token(token1, value1, translate);
41 end if;
42 if (token2 is not null) then
43 fnd_message.set_token(token2, value2, translate);
44 end if;
45 if (token3 is not null) then
46 fnd_message.set_token(token3, value3, translate);
47 end if;
48 app_exception.raise_exception;
49 end raise_error;
50
51 END FA_STANDARD_PKG;