Forum Stats

  • 3,854,206 Users
  • 2,264,340 Discussions
  • 7,905,609 Comments

Discussions

Handling database pl/sql exceptions, custom messages messages

Robert Šajina
Robert Šajina Member Posts: 94
edited May 5, 2017 4:09AM in JDeveloper and ADF

Hi,

is there a way to override the message that gets displayed when pl/sql raises a application exception?
For example ORA-20001: Some message here.  ORA-06512: at..........

Is there a way to display custom message when specific ora code occurs.

Thank you.

Ashish AwasthiRobert ŠajinaShaji555

Best Answer

  • managed BEAN
    managed BEAN Member Posts: 948 Silver Badge
    edited May 4, 2017 6:55PM Answer ✓

    Hello,

    You can download an application and follow a tutorial at Oracle ADF  which was very useful for me.

    The application consists of several projects, one of which is what you want - capture the errors at the model layer of pl/sql.

    Although you can also take a look at the other error levels which can be catch and handled too to be a user friendly message.

    Regards,

    Carlos

    Robert ŠajinaRobert ŠajinaShaji555

Answers

  • Shaji555
    Shaji555 Member Posts: 301
    edited May 4, 2017 10:18AM

    Can you look on below blog

    Rohan Walia's Tech Blog: Custom Exception Handling in ADF - Model Layer Generic Framework Design

    ***Moderator note (Timo):

    Please don't just answer by giving a link. Provide some more information on how you think the link will help to solve the problem. The Oracle Community – General FAQ state:

    I have an excellent blog entry that answers a very complex user question. Can I just post a link as the answer?

    Unfortunately, a link is not an answer. It’s a location of relevant and correct material to answer the question. And while the link to the blog is probably very useful, it will be flagged for review by the system moderators who are dedicated to ensuring the Community Platform is not susceptible to spam or any forms of promotion.

    The best approach is always to “Answer in the Discussion” and in this case, that would mean providing enough content to address the question and answer it completely--if not in absolute detail at least to the extent that it achieves content correctness. Additional resources such as links to relevant and correct material can be offered as “for more information” or further explanation, but the answer should be complete. If an external blog entry is being linked, please provide a substantive quote from the blog entry to add context for users.

    ***

    Ashish AwasthiRobert ŠajinaRobert Šajina
  • Robert Šajina
    Robert Šajina Member Posts: 94
    edited May 4, 2017 1:41PM

    Thank you for your response.

    I will take a look tomorrow.

  • managed BEAN
    managed BEAN Member Posts: 948 Silver Badge
    edited May 4, 2017 6:55PM Answer ✓

    Hello,

    You can download an application and follow a tutorial at Oracle ADF  which was very useful for me.

    The application consists of several projects, one of which is what you want - capture the errors at the model layer of pl/sql.

    Although you can also take a look at the other error levels which can be catch and handled too to be a user friendly message.

    Regards,

    Carlos

    Robert ŠajinaRobert ŠajinaShaji555
  • Robert Šajina
    Robert Šajina Member Posts: 94
    edited May 5, 2017 4:09AM

    Thank you for your responses. You both helped me a lot.

This discussion has been closed.