home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / po7_win / db / rdbms71 / prvtsyer.sql < prev    next >
Encoding:
Text File  |  1994-08-07  |  2.6 KB  |  68 lines

  1. rem 
  2. rem $Header: prvtsyer.sql 7010300.1 94/02/24 18:23:34 snataraj Generic<base> $ 
  3. rem 
  4. Rem
  5. Rem    NAME
  6. Rem      prvtsyer.sql - PRVT_SYs_ErroR - pl/sql routines for 
  7. Rem                     system error messages for DBMS* routines.
  8. Rem    DESCRIPTION
  9. Rem      These are private functions to be released in PL/SQL binary form.
  10. Rem      The package includes routines for raising erors a la raise_application
  11. Rem      error, but with the error rage dedicated to and allocated among
  12. Rem      DBMS* SQL routines.
  13. Rem      Eventuall, NLS functionality will be provided thought an interface 
  14. Rem      to kernel error functions.
  15. Rem    RETURNS
  16. Rem 
  17. Rem    NOTES
  18. Rem     Allocate error numbers in error.msg
  19. Rem     Range is 21300 to 22299
  20. Rem     DO NOT GRANT THIS PACKAGE TO PUBLIC
  21. Rem
  22. Rem    MODIFIED   (MM/DD/YY)
  23. Rem     adowning   02/04/94 -  Branch_for_patch
  24. Rem     adowning   02/04/94 -  Creation
  25. Rem     adowning   02/02/94 -  split file into public / private binary files
  26. Rem     dsdaniel   10/29/93 -  Creation
  27. Rem     dsdaniel   11/01/93 -  Branch_for_patch
  28. Rem
  29. REM ********************************************************************
  30. REM THESE PACKAGES MUST NOT BE MODIFIED BY THE CUSTOMER.  DOING SO
  31. REM COULD CAUSE INTERNAL ERRORS AND SECURITY VIOLATIONS IN THE
  32. REM RDBMS.  SPECIFICALLY, THE PSD*  ROUTINES MUST NOT BE
  33. REM CALLED DIRECTLY BY ANY CLIENT AND MUST REMAIN PRIVATE TO THE PACKAGE BODY.
  34. REM ********************************************************************
  35.  
  36. CREATE OR REPLACE PACKAGE dbms_sys_error IS
  37.   PROCEDURE raise_system_error(num            BINARY_INTEGER,
  38.                                msg            VARCHAR2,
  39.                                keeperrorstack BOOLEAN DEFAULT FALSE);
  40. -- Raise a system error int the range 21300 to 21399
  41. -- Input parameters:
  42. --   num
  43. --     Error number in the range 21300 to 21399
  44. --   msg 
  45. --     Error message
  46. --   keeerrorstack
  47. --     if True, raised error is added to the top of the current stack,
  48. --     so that any errors that caused this error to be raised are retained.
  49. -- Exception:
  50. --   raises ORA-21000 If error not in range.
  51. END dbms_sys_error;
  52. /
  53.  
  54. CREATE OR REPLACE PACKAGE BODY dbms_sys_error IS
  55.   PROCEDURE psdrse(num            BINARY_INTEGER,
  56.                    msg            VARCHAR2,
  57.                    keeperrorstack BOOLEAN DEFAULT FALSE); -- 1 (see psdicd.c)
  58.    PRAGMA INTERFACE (c,psdrse);
  59.  
  60.   PROCEDURE raise_system_error(num            BINARY_INTEGER,
  61.                                msg            VARCHAR2,
  62.                                keeperrorstack BOOLEAN DEFAULT FALSE) IS
  63.   BEGIN
  64.     psdrse(num,msg,keeperrorstack);
  65.   END;
  66. END dbms_sys_error;
  67. /
  68.