Fixes to mip_friendly_messages.pck.
Changed additional_items.lead_time to number field. Removed 'WORKSPACE_IMAGE' references from NG theme. git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3637 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -14,6 +14,20 @@ END mip_friendly_messages;
|
||||
/
|
||||
CREATE OR REPLACE PACKAGE BODY mip_friendly_messages IS
|
||||
|
||||
PROCEDURE pl(p_in VARCHAR2) IS
|
||||
l_fh utl_file.file_type;
|
||||
BEGIN
|
||||
dbms_application_info.set_module('MIP_FRIENDLY_MESSAGES'
|
||||
,p_in);
|
||||
l_fh := utl_file.fopen(location => 'WEBMIP_BULK_LOAD'
|
||||
,filename => 'MIP_FRIENDLY_MESSAGES.txt'
|
||||
,open_mode => 'A');
|
||||
utl_file.put_line(l_fh
|
||||
,to_char(SYSDATE
|
||||
,'DD/MM/YYYY HH24:MI:SS') || ',' || p_in);
|
||||
utl_file.fclose(l_fh);
|
||||
END pl;
|
||||
|
||||
FUNCTION get_constraint_message(p_ora_msg IN VARCHAR2) RETURN VARCHAR2 IS
|
||||
c_marker CONSTANT VARCHAR2(30) := 'constraint (';
|
||||
c_marker_length CONSTANT NUMBER := length(c_marker);
|
||||
@@ -23,6 +37,7 @@ CREATE OR REPLACE PACKAGE BODY mip_friendly_messages IS
|
||||
l_start_posn NUMBER;
|
||||
l_end_posn NUMBER;
|
||||
BEGIN
|
||||
|
||||
-- get the complete constraint "user.constraint_name"
|
||||
l_start_posn := instr(p_ora_msg
|
||||
,c_marker) + c_marker_length;
|
||||
@@ -33,12 +48,13 @@ CREATE OR REPLACE PACKAGE BODY mip_friendly_messages IS
|
||||
,l_start_posn
|
||||
,l_end_posn - l_start_posn + 1);
|
||||
|
||||
|
||||
-- get the "constraint_name"
|
||||
l_start_posn := instr(l_constraint
|
||||
,'.') + 1;
|
||||
l_constraint_name := substr(l_constraint
|
||||
,l_start_posn);
|
||||
|
||||
|
||||
BEGIN
|
||||
SELECT msg
|
||||
INTO l_msg
|
||||
@@ -49,7 +65,8 @@ CREATE OR REPLACE PACKAGE BODY mip_friendly_messages IS
|
||||
l_msg := NULL;
|
||||
END;
|
||||
IF l_msg IS NULL
|
||||
AND l_constraint_name LIKE 'SYS!_C%' ESCAPE '!'
|
||||
AND l_constraint_name LIKE 'SYS!_C%' ESCAPE
|
||||
'!'
|
||||
OR l_constraint_name LIKE 'AVCON!_%' ESCAPE '!' THEN
|
||||
-- this is a system generated check constraint and should not be appearing
|
||||
l_msg := 'Application error. Attempting to violate check constraint ' ||
|
||||
@@ -57,7 +74,7 @@ CREATE OR REPLACE PACKAGE BODY mip_friendly_messages IS
|
||||
'. Please report this error to Advantica.';
|
||||
END IF;
|
||||
RETURN l_msg;
|
||||
END;
|
||||
END get_constraint_message;
|
||||
|
||||
FUNCTION get_friendly_message(p_ora_msg IN VARCHAR2) RETURN VARCHAR2 IS
|
||||
l_ora_msg VARCHAR2(240) := p_ora_msg;
|
||||
@@ -75,7 +92,8 @@ CREATE OR REPLACE PACKAGE BODY mip_friendly_messages IS
|
||||
l_msg := l_ora_msg;
|
||||
END IF;
|
||||
|
||||
htp.prn(l_msg);
|
||||
htp.prn(to_char(SYSDATE
|
||||
,'hh24:mi:ss') || ' ' || l_msg);
|
||||
END get_friendly_message;
|
||||
|
||||
END mip_friendly_messages;
|
||||
|
||||
Reference in New Issue
Block a user