1 package body ff_utils as
2 /* $Header: ffutil.pkb 120.1.12000000.1 2007/01/17 17:53:40 appldev noship $ */
3 /*
4 * Set debug level.
5 */
6 procedure set_debug
7 (
8 p_debug_level in binary_integer
9 ) is
10 begin
11 -- Simply set the debugging level as appropriate.
12 ff_utils.g_debug_level := p_debug_level;
13 end set_debug;
14
15 /*
16 * Raise an assert if 'expression' is FALSE.
17 */
18 procedure assert
19 (
20 p_expression in boolean,
21 p_location in varchar2
22 ) is
23 begin
24 if(not p_expression) then
25 hr_utility.set_message(801, 'FFPLU01_ASSERTION_FAILED');
26 hr_utility.set_message_token('1', p_location);
27 hr_utility.raise_error;
28 end if;
29 end assert;
30
31 /*
32 * Function entry.
33 */
34 procedure entry
35 (
36 p_procedure_name in varchar2
37 ) is
38 begin
39 -- Check the debug level.
40 -- Unless it has a value set, we simply return.
41 if(ff_utils.g_debug_level is null or ff_utils.g_debug_level = 0) then
42 return;
43 end if;
44
45 -- Now check that the specific debug level has been set.
46 if(bitand(g_debug_level, ff_utils.ROUTING) <> 0) then
47 -- Tell the world that we have entered a function.
48 hr_utility.trace('In : ' || p_procedure_name);
49 end if;
50
51 end entry;
52
53 /*
54 * Function exit.
55 */
56 procedure exit
57 (
58 p_procedure_name in varchar2
59 ) is
60 begin
61 -- Check the debug level.
62 -- Unless it has a value set, we simply return.
63 if(ff_utils.g_debug_level is null or ff_utils.g_debug_level = 0) then
64 return;
65 end if;
66
67 -- Now check that the specific debug level has been set.
68 if(bitand(g_debug_level, ff_utils.ROUTING) <> 0) then
69 -- Tell the world that we have entered a function.
70 hr_utility.trace('Out : ' || p_procedure_name);
71 end if;
72
73 end exit;
74
75 end ff_utils;