1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

raise _application:error- differences???

Discussion in 'General' started by monkey, Apr 24, 2014.

  1. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Hello!
    This is template from net:

    Code (SQL):
    EXCEPTION
       WHEN OTHERS THEN
          raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    END;

    and this is what I was told:

    Code (SQL):
    EXCEPTION
    WHEN OTHERS THEN
    ROLLBACK TO SP1;

    raise_application_error(-20100, SQLERRM);

    it means, IN the CASE OF error, I should GET written SQLERRM  ON the screen?
    Sorry FOR studpid question, FIRST TIME IN life IN touch WITH that...
    END;
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
  3. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Many thanks!!!!