CREATE OR REPLACE PACKAGE EFT_NOM.cout_err IS g_header CONSTANT VARCHAR2(160) := '$Header: /Isle Of Grain/Database/PLSQL/cout_err.pck 3 1/04/05 16:13 Hardya $'; g_revision CONSTANT VARCHAR2(160) := '$Revision: 3 $'; /** -- Package containing the common error utility modules used by the Access Manager application -- #version $Revision: 3 $ -- #author Andy Hardy */ /** Specifies logging to be table-based (ERROR_LOGS), this the default log method.*/ c_table CONSTANT PLS_INTEGER := 1; /** Specifies logging to be file-based. */ c_file CONSTANT PLS_INTEGER := 2; /** Specifies logging to be screen-based. */ c_screen CONSTANT PLS_INTEGER := 3; /** Specifies the substitution values that could be passed into any generated error message */ TYPE g_t_substitution_list IS TABLE OF VARCHAR2(80) INDEX BY BINARY_INTEGER; c_empty_substitution_list g_t_substitution_list; /** -- Reports the error and RAISES an exception to halt program execution #param p_exception_number The exception to be raised, defaults to SQLCODE #param p_exception_message The message to be logged, defaults to the matching message from EXCEPTION_MESSAGES #param p_helper_call If TRUE, indicates that this report is being produced through a helper function #param p_error_group The error group that this error should be reported as a part of */ PROCEDURE report_and_stop(p_exception_number IN INTEGER := SQLCODE ,p_exception_message IN VARCHAR2 := NULL ,p_substitution_list IN g_t_substitution_list := c_empty_substitution_list ,p_helper_call_level IN NUMBER := 0 ,p_error_group IN VARCHAR2 := 'APPLICATION' ,p_severity IN VARCHAR2 := 'E' ,p_source IN VARCHAR2 := NULL); /** -- Reports the error and continues program execution #param p_exception_number The exception to be raised, defaults to SQLCODE #param p_exception_message The message to be logged, defaults to the matching message from EXCEPTION_MESSAGES #param p_helper_call If TRUE, indicates that this report is being produced through a helper function #param p_error_group The error group that this error should be reported as a part of */ PROCEDURE report_and_go(p_exception_number IN INTEGER := SQLCODE ,p_exception_message IN VARCHAR2 := NULL ,p_substitution_list IN g_t_substitution_list := c_empty_substitution_list ,p_helper_call_level IN NUMBER := 0 ,p_error_group IN VARCHAR2 := 'APPLICATION' ,p_severity IN VARCHAR2 := 'E' ,p_source IN VARCHAR2 := NULL); /** -- Allows the specification of the log destination #param p_target The destination (as defined by the constants c_table, c_file and c_screen #param p_dir If file has been chosen, allows the log directory to be specified #param p_file If file has been chosen, allows the log filename to be specified */ PROCEDURE logto(p_target IN PLS_INTEGER ,p_dir IN VARCHAR2 := NULL ,p_file IN VARCHAR2 := NULL); /** -- Returns the current log destination. #return Returns a value matching c_table, c_file or c_screen */ FUNCTION logging_to RETURN PLS_INTEGER; /** Return an identification string to link to the source control system. */ FUNCTION about RETURN VARCHAR2; END cout_err; /