[Home] [Help]
96: ----------------------------------------------------------------
97: IF (G_DEBUG = 1) THEN
98:
99: ----------------------------------------------------------------------------------
100: -- Opens Error_Handler debug session, only if Debug session is not already open.
101: ----------------------------------------------------------------------------------
102: IF (Error_Handler.Get_Debug <> 'Y') THEN
103: Open_Debug_Session_Internal;
104: END IF;
98:
99: ----------------------------------------------------------------------------------
100: -- Opens Error_Handler debug session, only if Debug session is not already open.
101: ----------------------------------------------------------------------------------
102: IF (Error_Handler.Get_Debug <> 'Y') THEN
103: Open_Debug_Session_Internal;
104: END IF;
105: END IF;
106: END Open_Debug_Session;
117: l_log_output_dir VARCHAR2(512);
118: l_log_return_status VARCHAR2(99);
119: l_errbuff VARCHAR2(999);
120: BEGIN
121: Error_Handler.initialize();
122: Error_Handler.set_bo_identifier(G_BO_IDENTIFIER);
123:
124: OPEN c_get_utl_file_dir;
125: FETCH c_get_utl_file_dir INTO l_log_output_dir;
118: l_log_return_status VARCHAR2(99);
119: l_errbuff VARCHAR2(999);
120: BEGIN
121: Error_Handler.initialize();
122: Error_Handler.set_bo_identifier(G_BO_IDENTIFIER);
123:
124: OPEN c_get_utl_file_dir;
125: FETCH c_get_utl_file_dir INTO l_log_output_dir;
126: IF c_get_utl_file_dir%FOUND THEN
134: G_ERROR_FILE_NAME := G_ERROR_TABLE_NAME||'_'||to_char(sysdate, 'DDMONYYYY_HH24MISS')||'.err';
135:
136: -----------------------------------------------------------------------
137: -- To open the Debug Session to write the Debug Log. --
138: -- This sets Debug value so that Error_Handler.Get_Debug returns 'Y' --
139: -----------------------------------------------------------------------
140: Error_Handler.Open_Debug_Session(
141: p_debug_filename => G_ERROR_FILE_NAME
142: ,p_output_dir => l_log_output_dir
136: -----------------------------------------------------------------------
137: -- To open the Debug Session to write the Debug Log. --
138: -- This sets Debug value so that Error_Handler.Get_Debug returns 'Y' --
139: -----------------------------------------------------------------------
140: Error_Handler.Open_Debug_Session(
141: p_debug_filename => G_ERROR_FILE_NAME
142: ,p_output_dir => l_log_output_dir
143: ,x_return_status => l_log_return_status
144: ,x_error_mesg => l_errbuff
161:
162: PROCEDURE Developer_Debug(p_msg IN VARCHAR2) IS
163: l_err_msg VARCHAR2(240);
164: BEGIN
165: Error_Handler.Write_debug(p_msg);
166: EXCEPTION
167: WHEN OTHERS THEN
168: l_err_msg := SUBSTRB(SQLERRM, 1,240);
169: FND_FILE.put_line(FND_FILE.LOG, 'LOGGING SQL ERROR => '||l_err_msg);
175: PROCEDURE Close_Debug_Session IS
176:
177: BEGIN
178: -----------------------------------------------------------------------------
179: -- Close Error_Handler debug session, only if Debug session is already open.
180: -----------------------------------------------------------------------------
181: IF (Error_Handler.Get_Debug = 'Y') THEN
182: Error_Handler.Close_Debug_Session;
183: END IF;
177: BEGIN
178: -----------------------------------------------------------------------------
179: -- Close Error_Handler debug session, only if Debug session is already open.
180: -----------------------------------------------------------------------------
181: IF (Error_Handler.Get_Debug = 'Y') THEN
182: Error_Handler.Close_Debug_Session;
183: END IF;
184:
185: END Close_Debug_Session;
178: -----------------------------------------------------------------------------
179: -- Close Error_Handler debug session, only if Debug session is already open.
180: -----------------------------------------------------------------------------
181: IF (Error_Handler.Get_Debug = 'Y') THEN
182: Error_Handler.Close_Debug_Session;
183: END IF;
184:
185: END Close_Debug_Session;
186: -----------------------------------------------
298: -- To Number the Attribute Group Data Rows Uniquely.
299: ---------------------------------------------------------
300: L_ATTR_GRP_ROW_IDENT NUMBER(5) ;
301: ---------------------------------------------------------
302: -- Token tables to log errors, through Error_Handler
303: ---------------------------------------------------------
304: l_token_tbl_two Error_Handler.Token_Tbl_Type;
305: l_token_tbl_one Error_Handler.Token_Tbl_Type;
306: l_attr_group_type VARCHAR2(30);
300: L_ATTR_GRP_ROW_IDENT NUMBER(5) ;
301: ---------------------------------------------------------
302: -- Token tables to log errors, through Error_Handler
303: ---------------------------------------------------------
304: l_token_tbl_two Error_Handler.Token_Tbl_Type;
305: l_token_tbl_one Error_Handler.Token_Tbl_Type;
306: l_attr_group_type VARCHAR2(30);
307:
308:
301: ---------------------------------------------------------
302: -- Token tables to log errors, through Error_Handler
303: ---------------------------------------------------------
304: l_token_tbl_two Error_Handler.Token_Tbl_Type;
305: l_token_tbl_one Error_Handler.Token_Tbl_Type;
306: l_attr_group_type VARCHAR2(30);
307:
308:
309:
758: BEGIN
759:
760: Write_Conclog('Processing the User Defined Attributes ' );
761:
762: IF (Error_Handler.Get_Debug = 'Y') THEN
763: l_debug_level := 3; --continue writing to the Debug Log opened.
764: ELSE
765: l_debug_level := 0; --Since Debug log is not opened, donot open Debug log for User-Attrs also.
766: END IF;
833: ,p_entity_index => l_entity_index_counter --IN NUMBER
834: ,p_entity_code => G_ENTITY_CODE --IN VARCHAR2
835: --,p_debug_level => p_debug_level --IN NUMBER
836: ,p_debug_level => l_debug_level --IN NUMBER
837: ,p_init_error_handler => FND_API.G_FALSE --IN VARCHAR2
838: ,p_init_fnd_msg_list => FND_API.G_FALSE --IN VARCHAR2
839: ,p_log_errors => FND_API.G_TRUE --IN VARCHAR2
840: ,p_add_errors_to_fnd_stack => FND_API.G_TRUE --IN VARCHAR2
841: ,p_commit => FND_API.G_FALSE --IN VARCHAR2
919: ,p_entity_index => l_entity_index_counter --IN NUMBER
920: ,p_entity_code => G_ENTITY_CODE --IN VARCHAR2
921: --,p_debug_level => p_debug_level --IN NUMBER
922: ,p_debug_level => l_debug_level --IN NUMBER
923: ,p_init_error_handler => FND_API.G_FALSE --IN VARCHAR2
924: ,p_init_fnd_msg_list => FND_API.G_FALSE --IN VARCHAR2
925: ,p_log_errors => FND_API.G_TRUE --IN VARCHAR2
926: ,p_add_errors_to_fnd_stack => FND_API.G_TRUE --IN VARCHAR2
927: ,p_commit => FND_API.G_FALSE --IN VARCHAR2
996: ,p_entity_index => l_entity_index_counter --IN NUMBER
997: ,p_entity_code => G_ENTITY_CODE --IN VARCHAR2
998: --,p_debug_level => p_debug_level --IN NUMBER
999: ,p_debug_level => l_debug_level --IN NUMBER
1000: ,p_init_error_handler => FND_API.G_FALSE --IN VARCHAR2
1001: ,p_init_fnd_msg_list => FND_API.G_FALSE --IN VARCHAR2
1002: ,p_log_errors => FND_API.G_TRUE --IN VARCHAR2
1003: ,p_add_errors_to_fnd_stack => FND_API.G_TRUE --IN VARCHAR2
1004: ,p_commit => FND_API.G_FALSE --IN VARCHAR2
1044: -- within our Business Object's processing) --
1045: -------------------------------------------------------------------
1046: Write_Conclog('****Dumping the List of Error messages into the Concurrent Log***');
1047:
1048: ERROR_HANDLER.Log_Error(
1049: p_write_err_to_inttable => 'N'
1050: ,p_write_err_to_conclog => 'Y'
1051: ,p_write_err_to_debugfile => 'Y'
1052: );