Include not-null values into insert statement of error_logs table.
git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3055 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -199,31 +199,30 @@ CREATE OR REPLACE PACKAGE BODY cout_err IS
|
|||||||
l_err_loc VARCHAR2(240);
|
l_err_loc VARCHAR2(240);
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
|
BEGIN
|
||||||
BEGIN
|
SELECT to_char(abs(exception_number)) || ': ' || message
|
||||||
SELECT to_char(abs(exception_number)) || ': ' || message
|
,exme_type
|
||||||
,exme_type
|
INTO p_message
|
||||||
INTO p_message
|
,p_exme_type
|
||||||
,p_exme_type
|
FROM exception_messages
|
||||||
FROM exception_messages
|
WHERE exception_number = p_exception_number;
|
||||||
WHERE exception_number = p_exception_number;
|
EXCEPTION
|
||||||
EXCEPTION
|
WHEN no_data_found THEN
|
||||||
WHEN no_data_found THEN
|
p_message := 'UNABLE TO FIND MESSAGE FOR EXCEPTION ' ||
|
||||||
p_message := 'UNABLE TO FIND MESSAGE FOR EXCEPTION ' ||
|
to_char(p_exception_number);
|
||||||
to_char(p_exception_number);
|
p_exme_type := 'E';
|
||||||
p_exme_type := 'E';
|
END;
|
||||||
END;
|
|
||||||
|
l_index := p_substitution_list.FIRST;
|
||||||
l_index := p_substitution_list.FIRST;
|
|
||||||
|
LOOP
|
||||||
LOOP
|
EXIT WHEN l_index IS NULL;
|
||||||
EXIT WHEN l_index IS NULL;
|
p_message := REPLACE(p_message
|
||||||
p_message := REPLACE(p_message
|
,'<p' || l_index || '>'
|
||||||
,'<p' || l_index || '>'
|
,p_substitution_list(l_index));
|
||||||
,p_substitution_list(l_index));
|
l_index := p_substitution_list.NEXT(l_index);
|
||||||
l_index := p_substitution_list.NEXT(l_index);
|
END LOOP;
|
||||||
END LOOP;
|
|
||||||
|
|
||||||
END get_exception_message;
|
END get_exception_message;
|
||||||
|
|
||||||
PROCEDURE log(p_exception_number IN PLS_INTEGER := NULL
|
PROCEDURE log(p_exception_number IN PLS_INTEGER := NULL
|
||||||
@@ -271,22 +270,32 @@ CREATE OR REPLACE PACKAGE BODY cout_err IS
|
|||||||
|
|
||||||
IF g_target = c_table THEN
|
IF g_target = c_table THEN
|
||||||
INSERT INTO error_logs
|
INSERT INTO error_logs
|
||||||
(error_type
|
(erlo_id
|
||||||
|
,error_type
|
||||||
,SOURCE
|
,SOURCE
|
||||||
,severity
|
,severity
|
||||||
,ERROR_CODE
|
,ERROR_CODE
|
||||||
,error_message
|
,error_message
|
||||||
,error_date
|
,error_date
|
||||||
,error_status)
|
,error_status
|
||||||
|
,created_on
|
||||||
|
,created_by
|
||||||
|
,updated_on
|
||||||
|
,updated_by)
|
||||||
VALUES
|
VALUES
|
||||||
(p_error_group
|
(erlo_seq.NEXTVAL
|
||||||
|
,p_error_group
|
||||||
,nvl(p_source
|
,nvl(p_source
|
||||||
,l_name || ' line ' || l_lineno)
|
,l_name || ' line ' || l_lineno)
|
||||||
,l_exme_type
|
,l_exme_type
|
||||||
,l_exception_number
|
,l_exception_number
|
||||||
,l_exception_message
|
,l_exception_message
|
||||||
,SYSDATE
|
,SYSDATE
|
||||||
,'N');
|
,'N'
|
||||||
|
,SYSDATE
|
||||||
|
,0
|
||||||
|
,SYSDATE
|
||||||
|
,0);
|
||||||
|
|
||||||
pl('Error log:' || l_caller_type || ',' || l_name || ',' || l_lineno || ',' ||
|
pl('Error log:' || l_caller_type || ',' || l_name || ',' || l_lineno || ',' ||
|
||||||
l_exme_type || ',' || l_exception_number || ',' ||
|
l_exme_type || ',' || l_exception_number || ',' ||
|
||||||
|
|||||||
Reference in New Issue
Block a user