git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@50874 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
101
Data/BulkLoad/EFT/Nominations/plsql/cout_assert.bdy
Normal file
101
Data/BulkLoad/EFT/Nominations/plsql/cout_assert.bdy
Normal file
@@ -0,0 +1,101 @@
|
||||
CREATE OR REPLACE PACKAGE BODY EFT_NOM.cout_assert IS
|
||||
|
||||
g_header CONSTANT VARCHAR2(160) := '$Header: /Isle Of Grain/database/PLSQL/cout_assert.pck 1 7/01/05 12:54 Gilberta $';
|
||||
g_revision CONSTANT VARCHAR2(160) := '$Revision: 1 $';
|
||||
|
||||
PROCEDURE pl(p_msg VARCHAR2) IS
|
||||
l_start NUMBER := 1;
|
||||
l_len CONSTANT NUMBER := 255;
|
||||
BEGIN
|
||||
WHILE l_start <= length(p_msg) LOOP
|
||||
dbms_output.put_line(substr(p_msg
|
||||
,l_start
|
||||
,l_len));
|
||||
l_start := l_start + l_len;
|
||||
END LOOP;
|
||||
END pl;
|
||||
|
||||
PROCEDURE istrue(p_condition IN BOOLEAN
|
||||
,p_message IN VARCHAR2
|
||||
,p_raise_exception IN BOOLEAN := TRUE
|
||||
,p_exception IN NUMBER := -6502
|
||||
,p_substitution_list IN g_t_substitution_list := c_empty_substitution_list
|
||||
,p_helper_call_level IN NUMBER := 1) IS
|
||||
BEGIN
|
||||
IF NOT p_condition
|
||||
OR p_condition IS NULL THEN
|
||||
pl('Assertion Failure!');
|
||||
pl(p_message);
|
||||
IF p_raise_exception THEN
|
||||
cout_err.report_and_stop(p_exception_number => p_exception
|
||||
,p_exception_message => 'Assertion Failure:' ||
|
||||
p_message
|
||||
,p_substitution_list => p_substitution_list
|
||||
,p_helper_call_level => p_helper_call_level);
|
||||
ELSE
|
||||
cout_err.report_and_go(p_exception_number => p_exception
|
||||
,p_exception_message => p_message
|
||||
,p_substitution_list => p_substitution_list
|
||||
,p_helper_call_level => p_helper_call_level);
|
||||
END IF;
|
||||
END IF;
|
||||
END istrue;
|
||||
|
||||
PROCEDURE isnotnull(p_value IN VARCHAR2
|
||||
,p_message IN VARCHAR2
|
||||
,p_raise_exception IN BOOLEAN := TRUE
|
||||
,p_exception IN NUMBER := -6502
|
||||
,p_substitution_list IN g_t_substitution_list := c_empty_substitution_list) IS
|
||||
BEGIN
|
||||
istrue(p_value IS NOT NULL
|
||||
,p_message
|
||||
,p_raise_exception
|
||||
,p_exception
|
||||
,p_substitution_list
|
||||
,2);
|
||||
END;
|
||||
|
||||
PROCEDURE isnotnull(p_value IN DATE
|
||||
,p_message IN VARCHAR2
|
||||
,p_raise_exception IN BOOLEAN := TRUE
|
||||
,p_exception IN NUMBER := -6502
|
||||
,p_substitution_list IN g_t_substitution_list := c_empty_substitution_list) IS
|
||||
BEGIN
|
||||
istrue(p_value IS NOT NULL
|
||||
,p_message
|
||||
,p_raise_exception
|
||||
,p_exception
|
||||
,p_substitution_list
|
||||
,2);
|
||||
END;
|
||||
|
||||
PROCEDURE isnotnull(p_value IN NUMBER
|
||||
,p_message IN VARCHAR2
|
||||
,p_raise_exception IN BOOLEAN := TRUE
|
||||
,p_exception IN NUMBER := -6502
|
||||
,p_substitution_list IN g_t_substitution_list := c_empty_substitution_list) IS
|
||||
BEGIN
|
||||
istrue(p_value IS NOT NULL
|
||||
,p_message
|
||||
,p_raise_exception
|
||||
,p_exception
|
||||
,p_substitution_list
|
||||
,2);
|
||||
END;
|
||||
|
||||
PROCEDURE isnotnull(p_value IN BOOLEAN
|
||||
,p_message IN VARCHAR2
|
||||
,p_raise_exception IN BOOLEAN := TRUE
|
||||
,p_exception IN NUMBER := -6502
|
||||
,p_substitution_list IN g_t_substitution_list := c_empty_substitution_list) IS
|
||||
BEGIN
|
||||
istrue(p_value IS NOT NULL
|
||||
,p_message
|
||||
,p_raise_exception
|
||||
,p_exception
|
||||
,p_substitution_list
|
||||
,2);
|
||||
END;
|
||||
END cout_assert;
|
||||
/
|
||||
|
||||
Reference in New Issue
Block a user