Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Posts
    37

    Unanswered: clearify this statement please

    what does a statement like this do??
    declare
    e exception;
    pragma exception_init( e, -1652 );

    begin
    . ..

    end;

  2. #2
    Join Date
    Apr 2003
    Location
    Minneapolis, MN
    Posts
    273

    Re: clearify this statement please

    Originally posted by chiranjib_s
    what does a statement like this do??
    declare
    e exception;
    pragma exception_init( e, -1652 );

    begin
    . ..

    end;
    It initialize the exception e with the oracle error code ORA-1652. So whenever there is an execption occur during execution and you do not want oracle to display it's own default error message for this code, you can provide your own custom error message for the same.
    Bhavin

    MS Computer Science
    OCP DBA 9i/8i

  3. #3
    Join Date
    Jan 2004
    Posts
    37
    hi Bhavin what exactly are pragma exceptions????

  4. #4
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    The PRAGMA EXCEPTION_INIT statement associates a user defined exception with an unnamed Oracle Exception. The main purpose of creating this association is to explicity catch the unnamed Oracle error, providing the opportunity to execute a series of statements when the error occurs. Alternatively, one can simply provide a more meaningful error message to the user.
    Last edited by r123456; 02-11-04 at 04:46.
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •