How to avoid catching Raise_Application_Error call in THEN to OTHERS THEN

I have a few calls Raise_Application_Error in my body of the procedure. I have a WHEN OTHERS exception block and THEN to capture exceptions ORA and sent a generic message to frontend. However, I want to avoid capture Raise_Application_Error calls from my body of the procedure.

Like this?

SQL> create table t (no integer);

Table created.

SQL> declare
  2    l_no integer;
  3  begin
  4    select no into l_no from t ;
  5
  6    raise_application_error(-20001, 'Record Exists');
  7  exception
  8    when others then
  9       if sqlcode > -20000 then
 10           raise_application_error(-20002, 'System error, contact admin');
 11       else
 12           raise;
 13       end if;
 14  end;
 15  /
declare
*
ERROR at line 1:
ORA-20002: System error, contact admin
ORA-06512: at line 10

SQL> insert into t values (1);

1 row created.

SQL> declare
  2    l_no integer;
  3  begin
  4    select no into l_no from t ;
  5
  6    raise_application_error(-20001, 'Record Exists');
  7  exception
  8    when others then
  9       if sqlcode > -20000 then
 10           raise_application_error(-20002, 'System error, contact admin');
 11       else
 12           raise;
 13       end if;
 14  end;
 15  /
declare
*
ERROR at line 1:
ORA-20001: Record Exists
ORA-06512: at line 12

SQL>

But remember when you delete oracle error make sure save you it somewhere for later use. Otherwise you will have trouble. DBMS_UTILITY offers methods to track exceptions and the call stack.

Tags: Database

Similar Questions

  • My iPad detects inactivity while I'm listening to a story.  Then he slips into the mode "sleep" and interrupts the story.  Any suggestions on how to avoid this?

    My iPad detects inactivity while I'm listening to a story.  Then he slips into the mode "sleep" and interrupts the story.  Any suggestions on how to avoid this?

    Setting to never by using the auto-lock settings application.

    Settings > general > auto lock > never

  • How to avoid the launch of Labview when called by Teststand VI

    Hi, friends.

    I am a student of teststand. I wrote a few screws by Labview. Now, I want to invoke in teststand environment. But when I run the sequence. LabVIEW automatically launches. How to avoid the launch of Labview when I run the sequence?

    Thank you.

    I'm not sure that I follow what you're saying...  But it seems that when the VI is called, the LabVIEW Development software is started and you want to avoid this.

    If you create an executable file or a dll and that any call within TestStand, she should not call the development environment.  You must have the LabVIEW runtime engine installed on the target computer.

    For several years I used TestStand with LV, if my memory does not have to be precise.  I think that the above worked for me.  However, it seems that I remember something to have the LV code in debug mode, causing to open development environment... but it's a distant memory.    You do not use breakpoints where the LV VI is called, are you?

    R

  • Print last page blank, how to avoid the last page to print, using NiReport

    Hi all

    I use NIReport to generate report/Print.

    I have problem

    I have a page to print,

    I wrote until the last line

    Problem is that NEITHER report adds a new, blank page, which is not necessary.

    This problem n, t occur when we write in the last row or left white.

    Note: I also have a header and footer details

    It will be printed on the blank page.

    When NIReport understand specific text is last line of the page, then NIReport automatically add the new page in the template.

    How to avoid printing the last white page in NIReport?

    Thank you

    Mukesh Kumar

    Just a guess: you use AppendLine? If so, you can try to move on AppendText to write the line, adding of newline as the first call when you need to start a new line. AppendLine adds a new line to the report after printing the line, and this can generate a blank page if you write to the last line on the page.

  • Modal region of the tree as a popup... After clicking the value in the tree... How to avoid the parent page is refreshing

    Hi, I spent long hours to solve this problem and wait for the answer from the expert.

    I created a form with text boxes and one of them, I created just small image button to call the modal region of the tree.

    Everything is OK, tree appear and disappear after the passage of the code value for the text element in the parent form.

    But it refreshed and initialized all other areas of empty text as well... ^ ^;

    I think that, because of the link in SQL tree. Someone help me?

    Select case when connect_by_isleaf = 1 then 0

    When level = 1 then 1

    else                           -1

    end the status,

    level,

    "CAT_NM" as the title,

    NULL as an icon,

    "CAT_CD" as a value.

    NULL as ToolTip,

    ? p = & APP_ID.:112 :'|| : APP_SESSION |': P112_CAT_CD :'|| "' CAT_CD ' as link-> How to avoid refreshing the page parent and just switch the CAT_CD to the called page?

    'category '.

    Start with 'PARENT_CAT_CD' is null

    connect prior "CAT_CD" = "PARENT_CAT_CD."

    siblings arrested by "CAT_CD".

    Hey "zoomok,"

    Large - an example would have been my next request in any case I took a glance and changed your demo page to work as you want.

    Things of note:

    -SQL source tree: NO link value! A link value will generate apex code that will redirect you to the link. It will always be a redirect page, where a rerender page, and not what you want! Leaving NULL allows us to interact with the tree interactively via javascript

    -Code in variables and functions global page - javascript - next:

    function treeOnload(){
      var l$Tree = $("#tree_modal div.tree"); // get the tree instance
      // handle the onselect event of the tree
      $.tree.reference(l$Tree).settings.callback.onselect = function(NODE, TREE_OBJ){
        $s( "P112_CAT_CD", $(NODE).attr('id') ); // get the VALUE of the node and put it in item P112_CAT_CD
        closeModal(); // close the active modal region
      };
    };
    

    -In javascript - dependent section I added a call to this procedure:

    treeOnload(); // initialize the tree with our settings
    

    And that's all! I didn't know that you use "openModal". There are different ways to implement modal regions, so it is important to know how we do for ourselves what to do with it.

    FYI - you now need to change your credentials. And mark the answer that has helped you or is correct, please.

  • I downloaded Safari 10 and now every page that uses Java asks me to activate or not. How to avoid this new feature? I have problems to access my bank account.

    I downloaded Safari 10 and now every page that uses Java asks me to activate or not. How to avoid this new feature? I have problems to access my bank account.

    I think they mean JavaScript.

    In your Safari menu bar, click Safari > Preferences and then select the Security tab, and then select: Enable JavaScript

  • Camileo S10 - how to avoid the 'information' during video playback on TV

    I just received my Camileo S10... very nice indeed... but how to avoid the track and reading data to be shown on the screen during playback on my TV...?

    Go to the movies, then before you start playing click the OK button. This also works when you save. You must do this before playing or recording.

  • How to avoid the DPP transfer CR2 on desktop

    Hello

    Please if you can help me;

    My OS-> XP pro SP3
    My PLR-> version 3.14.15

    When I drag an image (size cr2) DPP automatically, it is transferred to
    screen area.

    How to avoid this?

    Import your images into the folder you want first, and then use PLR for access to this folder and from there we can work better. Otherwise, on DPP to start, choose a different folder of office (on the left, you may need to toggle the DISPLAY of RECORDS).

  • How to uninstall a program called "security Defender"?

    How uninstall a fill you called "security Defender"?

    Hello

    Security Defender is a fake antivirus, a scam to force you to pay for it, while it has no advantage at all.

    Remove Security Defender (uninstall Guide)<-- read="" this="">
    http://www.bleepingcomputer.com/virus-removal/remove-security-Defender

    See if you can access the internet using the safe mode with networking (repeatedly press F8 as you start).
    If you are unable to access the internet, then you will need download the programs on another computer
    and transfer to it on removable media such as CD, DVD or USB drives.

    It can be made repeatedly in Mode safe - F8 tap that you start, however, you must also run
    the regular windows when you can.

    TDSSKiller.exe. - Download the desktop - so go ahead and right-click on it - RUN AS ADMIN
    It will display all the infections in the report after you run - if it will not run changed the name of
    TDSSKiller.exe to tdsskiller.com. If she finds something or not does not mean that you should not
    check with the other methods below.
    http://support.Kaspersky.com/viruses/solutions?QID=208280684

    Download malwarebytes and scan with it, run MRT and add Prevx to be sure that he is gone.
    (If Rootkits run UnHackMe)

    Download - SAVE - go to where you put it-right on - click RUN AS ADMIN

    Malwarebytes - free
    http://www.Malwarebytes.org/products/malwarebytes_free

    SuperAntiSpyware Portable Scanner - free
    http://www.SUPERAntiSpyware.com/portablescanner.HTML?tag=SAS_HOMEPAGE

    Run the malware removal tool from Microsoft

    Start - type in the search box-> find MRT top - right on - click RUN AS ADMIN.

    You should get this tool and its updates via Windows updates - if necessary, you can
    Download it here.

    Download - SAVE - go to where you put it-right on - click RUN AS ADMIN
    (Then run MRT as shown above.)

    Microsoft Malicious - 32-bit removal tool
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=AD724AE0-E72D-4F54-9AB3-75B8EB148356&displaylang=en

    Microsoft Malicious removal tool - 64 bit
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=585D2BDE-367F-495e-94E7-6349F4EFFC74&displaylang=en

    also install Prevx to be sure that it is all gone.

    Download - SAVE - go to where you put it-right on - click RUN AS ADMIN

    Prevx - Home - free - small, fast, exceptional CLOUD protection, working with others
    security programs. It is a single scanner, VERY EFFICIENT, if it finds something to come back
    here or use Google to see how to remove.
    http://www.prevx.com/   <-->
    http://info.prevx.com/downloadcsi.asp  <-->

    Choice of PCmag editor - Prevx-
    http://www.PCMag.com/Article2/0, 2817,2346862,00.asp

    Try the demo version of Hitman Pro:

    Hitman Pro is a second scanner reviews, designed to save your computer from malicious software
    (viruses, Trojans, rootkits, etc.). who infected your computer despite safe
    what you have done (such as antivirus, firewall, etc.).
    http://www.SurfRight.nl/en/hitmanpro

    --------------------------------------------------------

    If necessary here are some free online scanners to help the

    http://www.eset.com/onlinescan/

    -----------------------------------

    Original version is now replaced by the Microsoft Safety Scanner
    http://OneCare.live.com/site/en-us/default.htm

    Microsoft safety scanner
    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    ----------------------------------

    http://www.Kaspersky.com/virusscanner

    Other tests free online
    http://www.Google.com/search?hl=en&source=HP&q=antivirus+free+online+scan&AQ=f&OQ=&AQI=G1

    --------------------------------------------------------

    Also do to the General corruption of cleaning and repair/replace damaged/missing system files.

    Run DiskCleanup - start - all programs - Accessories - System Tools - Disk Cleanup

    RUN - type in the box-

    sfc/scannow

    Then run checkdisk (chkdsk).

    RUN - type in the box-

    Chkdsk /f /r

    -----------------------------------------------------------------------

    If we find Rootkits use this thread and other suggestions. (Run UnHackMe)

    http://social.answers.Microsoft.com/forums/en-us/InternetExplorer/thread/a8f665f0-C793-441A-a5b9-54b7e1e7a5a4/

    I hope this helps and happy holidays!

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

  • How to use Skype to call from my computer to another computer

    Original title: how to call a computer to

    Hello

    I can't find the instructions on how to use Skype to call from my computer to another computer so that I can get the video. Help.

    TIA,

    RS

    For a first test, the simplest method is to organize before a time and date when you're both already connected to the internet and connected to Skype.

    Then, they appear as 'online' in your Skype contact list. And communicate with them through that. Do not use the phone number.

    You need to get them in your contact list, if they are not already in it.

    Skype: Add contact

    https://support.Skype.com/en/FAQ/FA3281/how-do-i-add-contacts-in-Skype-for-Windows-desktop

  • How to avoid make records duplicate when you save a series?

    How to avoid make records duplicate when you save a series?

    When you schedule a recording for a TV series, Media Center automatically records episodes based on the options you set here.

    1. click the Start button, click all programsand then click Windows Media Center.

    2. on the Media Center start screen, navigate to tasks, click settings, click TV, click recorderand then click default record.

    3 scroll to the series as the default record section.

    4. do one of the following:

    ·         Under Show type, click the plus sign (+) or minus (-) button to record only new episodes, reruns or direct episodes.

    ·         Under channels, click the plus (+) or minus (-) record button present in this series on any channel, or on a specific channel.

    ·         According airtime, click the plus sign (+) or minus (-) button record shows in this series at any time, or only at a specific time.

    ·         Under the keep up to, choose how many records in this series to keep before older episodes are automatically deleted.

    5. click on Save.

  • Refreshing the page creates a new record – how to avoid this?

    I have a 'submit' button that runs a 'record insertion.

    After insertion is made I branch (back) to this same page.

    The problem is that when I hit page refresh the folder gets reinserted.

    How to avoid this behavior?

    AZZ says:

    fac586,

    Yes. You are right. It was a late semi written post. My apologies. You must stop working after midnight.

    Let me clarify:

    I have a SUBMIT"" button.

    There are the conditional 'after send' (if the key) process.

    the process calls a function that inserts a new record in the table.

    Question:

    How can I avoid running the process on refreshing the page?

    I've simplified the situation - no record insertion. However, if you refresh the page the success of the function call message will be displayed.

    https://Apex.Oracle.com/pls/Apex/f?p=4000:1:126172565551184:no:RP:FB_FLOW_ID, F4000_P1_FLOW:21325, 21325

    user/pass help/help

    workspace - AZ_

    To reproduce:

    Click on the submit - observe green popup "OK!"

    Refresh the page (F5 or ctrl-R) - see 'OK!' again.

    No process is executed to see the page or page refresh. This can be confirmed by looking at track of debugging to see the processing page. The page contains no defined process to run at a show of page processing point; None of the calculations which could call a function that could not perform an insert as a side effect; None of the dynamic actions or calls JS could initiate an insertion using AJAX; Neither the source region contains any code that could do it. I'll draw the line search conditions that can contain deeply buried code which could be responsible and direct you to a previous thread of the same nature: success of process Message not tied to Conditions.

  • How to install facebook video call in windows 8

    I just want to ask how to install facebook video call in windows 8, because when I try to install it, message: you cannot run this program and try to find in applications.

    Hi Dave,.

    Welcome to the Microsoft Community and thank you for the post.

    From the description, I understand that you can not install Facebook video call on your computer with Windows 8.

    We need some information from you on this issue.

    (1) what is the full exact error message?
    (2) what version of Facebook video call you trying to install?

    According to our Facebook video call records is compatible with Windows 8. There are two version of Facebook video calling Version 1.2 and Facebook video calling Version 1.1 that are compatible with Windows 8.

    http://www.microsoft.com/en-us/windows/compatibility/win8/CompatCenter/ProductDetailsViewer?Name=Facebook%20Video%20Calling&vendor=Facebook&Locale=1033&ModelOrVersion=1&BreadCrumbPath=facebook%20video%20calling&Type=Software&tempOsid=win8

    If you try to install another version then you must install it in compatibility mode. You can follow the steps here.

    http://Windows.Microsoft.com/en-us/Windows-8/older-programs-compatible-version-Windows

    For further assistance, you can see the steps in the link here.

    http://www.Facebook.com/help/125103517575494/

    Feel free to write us if you have any other matter relating to the installation. We will be happy to help you.

  • How to avoid the glossy look and brilliant nostrils?

    I just built my first character of fuse and when I import into Photoshop, its nostrils are incandescent - as if the light shines through the back of his head!

    This fuse:

    Screen Shot 2016-01-17 at 04.27.53.png

    Becomes this in Photoshop:

    Screen Shot 2016-01-17 at 04.47.21.png

    I use a brush to set the nostrils, but have no idea how fix eye - of the suggestions?

    Even better - any ideas on how to avoid the glossy look and glowing nostrils?

    Thank you very much
    Malcolm

    Hey, Malcolm.

    Best way to explain what basically rendering 3D correctly really takes a lot of time, haha.  So that you may be able to work with the real-time 3D model and make changes quickly, we use two different rendering methods.

    There is an "Interactive" mode which is not like the beautiful light/shade, but is very fast - and that's what you see when you interact with the default template.

    Then, there is a mode "Raytraced" which is much more advanced calculations and stuff to give you a proper lighting / shadow.  Raytraced rendered may take time if so we can not use it all the time.

    In order to get the lights/shadows appropriate you need to perform a path Ray would make on the document.  Best way to do this:

    • Select your 3D layer in the layers panel
    • Make a selection in the drawing area to the area that you want to make (I recommend to test rendering of area to check the lighting/shadows before committing to make the whole layer).
    • Push the button is rendered at the bottom of the properties panel (it looks like a cube in a rectangle box, right next to the delete icon).

    There are other things that you must do if you want to get the best image search quality such as the addition of secondary lights!  You can add more lights in the 3D Panel using the small icon of light at the bottom.  Have 2-3 stage lights and adjusting their colors can make a big difference with the Assembly of your character in the scene.  Here is a small image for some comparisons:

    You can see the image with two lights a look much more realistic lighting and shadows and raytraced of one and two versions are much nicer and cleaner!

    Hope that helps!

  • Favorite Confirmation your Favorites list has been successfully updated. How to avoid this

    Favorite Confirmation your Favorites list has been successfully updated.   This message was showing every time, after I decided to a product,

    But my requirement is:

    After logging in, a favorite of box user a product by clicking on an icon of the heart, under the thumbnail image, only the color of the heart icon should be changed, if a favorite is applied or favorite is removed it will change to another color, (tag icon he color change already there is BC) my only concern is how to avoid these (favorite Favorites Confirmation your list has been updated with success.) currently its display in a blank page with the confirmation text

    If a user wishes to favorite means more than 15 products, whenever it shows the message... Please someone help me... If I almost finish my project is over... Pleaseeeeeeeeeeeeeeeeee

    Do you it with JavaScript, crush the BC function that is called to save the favorite to eliminate the popup alert and full of color. I don't have code available to post. I hope this helps.

Maybe you are looking for