Print out meaningful exception messages

Hi There,
I have sucessfully imported java classes to forms. Java talks to webservices.
the CLient java that talks to forms throws Exception
public class ANB {
public static String ANB(java.lang.String b) throws Exception{
............code..................
return a;
private static String a = "";
In the forms I have
call ANB
WHEN Ora_java.Java_error THEN
Message ('Unable to call out to Java, ' || Ora_java.Last_error);
WHEN Ora_java.Exception_thrown THEN
Raisedexception := Ora_java.Last_exception;
Message (Exception_.Getmessage_347 (Raisedexception));
Ora_java.Clear_exception;******************************
With the code written above, if an error occurs then error message displayed is as follows:
java.sql.SQLException: ORA-21111:
ORA-06512: at "ABCD.TestTable_BIUR", line 6
ORA-04088: error during execution of trigger 'ABCD.TestTable_BIUR'
ORA-06512: at line 1............
I want the error message displayed, to be meaningful to the user. Say for example,
if an user defined Exception ORA-21111 was raised , i want only the error message associated with the error code to be shown.
Thanks

Yes this seems a good idea. I recommend you do that.
Please next time ask an actual question. I suspect the answer to your unasked question is to look at using methods like getVendorCode or getSQLState of java.sql.SQLException.

Similar Messages

  • How can i print out old text messages?

    how can i print out old text messages?

    As Ann said, it does depend on your phone.  One third party app that works on many phones (especially older models, but not all phones) is BitPim ( http://www.bitpim.org/ ) but it can potentially harm/brick your phone if you don't know what you are doing - use it with caution.  I have used it successfully to get texts and photos off an old flip phone that was deactivated and had no sd card.
    Newer smartphones can download apps that will give you the ability to print out texts.

  • Is there any way to print out my text messages?

    IM trying to figure out if there is any way to print out my text messages?  thankyou

    You can print off your text message number sent and received by accessing www.verizonwireles.com login with your user id and password. Once logged in select my bill click on usage details then click on messages it will pull up the numbers you can print them from there. If you are looking for the actual messages you will not be to view that information online you can only get that information court ordered subpoena. 

  • HT3529 Is there a free option to printing out multiple text messages from one person?

    is there a free option to printing out multiple text messages from on person?

    Printing from the iPhone either requires an AirPrint compatible printer, or an app from the App Store. You would have to search to see if they are free or cost. Also, the printing of text messages would either require you to make a screen shot of the message and to print that as a photo, or you would need a 3rd party software on the computer to copy the entire message to the computer and print from there. There is no native print capability for entire message threads.

  • Print out of text message history!

    Hey guys,
    Does anyone know how i can get a print out of my entire text message history for one conversation on my iphone 4.  I know it is in the phone because i can view it bit by bit if i continue to scroll and hit "view previous messages" but i am in the middle of a legal thing and i desperately need a print out of the history of this one conversation.  There has to be a computer genius out there than can help me.  There must be a way to export it to my macbook or my email or something.  Please if you know anything i would be so grateful.  Thank you!

    Two Methods:
    1. You can put the text messages on your screen like your reading it.. press the lock button and the home button at the same time.. it will take a picture of it and be saved to your photo album.. then upload it to your computer or email it to yourself..it won't be a document but it will be a picture and that's something.
    2. use iPhone backp extractor app:
    First backup your iPhone to your computer with iTunes, all text messages, contacts will be included in the backp file, but it is an unreadable format, you have to extract them to your computer for print.
    Vibosoft iPhone message extract:
    How to Print Messages Conversation from iPhone with Dates & Times
    iStonsoft iPhone SMS recovery
    How to Print out iPhone text messages
    and more...

  • HT3529 easiest way to print out my text messages from one person

    I would love to know the easiest way to print out my text messages from one person, how can I do that?
    I just did the last IOS updated, I'm not sure the number after it

    Printing from the iPhone either requires an AirPrint compatible printer, or an app from the App Store. You would have to search to see if they are free or cost. Also, the printing of text messages would either require you to make a screen shot of the message and to print that as a photo, or you would need a 3rd party software on the computer to copy the entire message to the computer and print from there. There is no native print capability for entire message threads.

  • How to print out the exception caught in the servlet controller to JSP?

    May I know how to print the Exception caught and the stacktrace thing? What i try to do this in the databaseErrata.jsp code was not given me any answer. Instead, causing a number of errors.
    Below are my servlet controller code and databaseErrata.jsp code.
    ----$CATALINA_HOME/webapps/mvct/WEB-INF/classes/Action.java----
    import java.io.*;
    import java.sql.*;
    import java.text.*;
    import javax.naming.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import foo.*;
    public class Action extends HttpServlet
      public void doGet(HttpServletRequest request,
    HttpServletResponse response)
        throws ServletException, IOException
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();
        // find real web resource
        String forward = request.getServletPath();
    //'forward' is a string variable consist of url
        if(forward.endsWith(".do"))
          forward = forward.substring(1, forward.length()
    -3) + ".jsp";
        else
          throw new ServletException(
          "Action servlet called with illegal path: " +
    forward); //display the defined error msg and error
    url within the 'forward'
    out.println("forward after forward.substring() = " +
    forward + "</br>");
        // build and validate view page attributes
        HttpSession session = request.getSession();
        try
          byEmployeeId convert =
    (byEmployeeId)session.getAttribute("convert");
          if(convert == null)
            session.setAttribute("convert", convert = new
    byEmployeeId());
          convert.start("11145");
        catch(NamingException ex)
          request.setAttribute("exception", ex);
          forward = "databaseError.jsp";
        catch(SQLException ex)
          request.setAttribute("exception", ex);
          forward = "databaseErrata.jsp";
        catch(IllegalArgumentException ex)
          request.setAttribute("message", "<FONT COLOR='red'>"+ex.getMessage()+"</font>");
        // forward request
        RequestDispatcher rd =
    request.getRequestDispatcher(forward);
        rd.forward(request,response);
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
        throws ServletException, IOException
          doGet(request, response);
    }----$CATALINA_HOME/webapps/mvct/databaseErrata.jsp----
    <% String message = (String)request.getAttribute("message"); %>
    <HTML>
    <HEAD>
    <TITLE>databaseErrata.jsp Page</TITLE>
    </HEAD>
    <BODY>
    <% if (message != null) { %>
    Message = <%= message %>
    <H1>databaseErrata.jsp Page</H1>
    </BODY>
    </HTML>

    You're missing a closing curly bracket in the JSP page.
    Also, this will only print the exception message. I would recommend passing on the whole Exception object.
    ie request.setAttribute("theException", ex);
    That way you have the exception object to print the stacktrace from.
    However, you are doing this manually. The container can handle this stuff for you if you so wish.
    Check the documentation on error pages. You are able to set up an error page in the web.xml, that all exceptions/errors get directed to.
    something like:
    <error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/errorPages/debugError.jsp</location>
    </error-page>
    You then write the JSP page something like this
    <%@ page language="java" %>
    <%@ page isErrorPage="true" %>
    <%@ page import="java.util.*, java.io.*" %>
    <h1>Programming error <BR> FOR DEBUGGING PURPOSES ONLY</h1>
    <p>This page is only for debugging purposes.  Should not be deployed to live environment.</p>
    <p>Details of the error are as follows:</p>
    <table border = 1 width=200>
    <tr><td valign=top><strong>Error :</strong></td><td><%=exception.getMessage()%></td></tr>
    <tr><td valign=top width='80%'><strong>Trace :</strong></td><td><pre><% exception.printStackTrace(new PrintWriter(out));%></pre></td></tr>
    </table>
    <br>Cheers,
    evnafets

  • How can I print out stored text messages from an LG enV3?!

    My mother is on my phone plan, she has a LG enV®3 and has some text messages stored on her phone she would like printed out. I was told by the in-store salesman that this was something I could do here online. But I have yet to find a link that is providing that service. I need them as soon as possible as she is finally looking to upgrade to a new phone, but I can't find this mysterious link. As you may know the LG enV®3 is not a smartphone so I cannot use a messaging app to remove the texts. If anyone has information or knows how I could do this you'd help me greatly.

    Try using bitpim software:
    Welcome to BitPim

  • Re scheduling out with exception message 15 in MD04

    Hi All,
    In stock/requirement list the Purchase order is split into several  Quanities on the same day with exception message 15 instead of displaying single PO. Also, attached the screen shot for your reference.
    Please let us know what could be reason for this.
    Regards,
    Prabhakar.V

    Hi All,
    I tried both the customization and run MRP but still Multiple PO item is appearing in the stock/requirement list and problem is not resolved yet.
    Could you please suggest to proceed further.
    Thanks and regards,
    Prabhakar.V

  • When I print one of my Yahoo emails, the text of the message doesn't wrap, so is cut off,and the side bar with Inbox, Sent, Drafts, etc is printed out with the message.

    When I print a Yahoo email, the text does not wrap (it used to) so part of the text is cut off. Also, the side bar that list my Inbox, Drafts, Sent, etc is printed out along with the email - it didn't used to and because of that, there is not enough room for all of my email. I tried resetting it to Shrink to Fit, but that didn't help; also tried changing the print setting from 100% to 60% but it still doesn't fit on the page.
    == This happened ==
    Every time Firefox opened
    == Today

    help I have the same problem. it just started recently. I didn't change anything and all of a sudden my printed emails have the entire sidebar and also does not wrap the text so parts are missing.

  • Print out a text message from mobile phone!

    I have my Droid hooked up to my home computer and I'm trying to download ( or print ) a text conversation. Is their a way of doing this? Anyone know???

    There are applications in the Play Store that will backup the text messages to an XML file and save it to the phone's storage memory. You can then copy or email the XML file to your computer. On the computer you can open the file in Internet Explorer or another program compatible with XML files. Once open you can print it out to a hard copy.
    There are similar application that will backup the text conversations to an email address if you prefer.

  • How can I transfer or print out my text messages from iphone 4 to MacBook Pro

    How can I save or print my text messages from my iphone 4 to my computer - MacBook Pro?

    You need third-party software, like this:
    http://www.ecamm.com/mac/phoneview/
    Or you can take screen shots, then email them to yourself or copy & paste into an email, again sending such to yourself. Me? I'd get Phoneview, very handy to keep around.

  • How to show exception messages in Terminal

    Hi all,
    I use clang-3.1 in C++11 mode, with -stdlib=libc++, without any IDE, just on the command line.
    My problem is: my c++ code is expected to throw exceptions (I'm testing it), but the Terminal does not print out the exception messages. Instead of my nice exception messages (which I see with clang-3.1 on linux), I have things like: "terminate called throwing an exceptionAbort trap:"
    How should I act on the environment of the code to display those exception messages? I don't want to change the code.
    Many thanks,
    Best regards,
    Romain

    You are posting in a user forum. Probably the vast majority of the people here don't have the foggiest idea what you are talking about. Post in the Developer forum.

  • Hi does anyone know if you upload / store / print out text messages.

    Hi does anyone know if you can upload / store / print out your text messages as they appear on your phone?

    Using Syphone. http://www.macupdate.com/app/mac/25983/syphone/

  • Can I copy, email, or print out text messages?

    I would like to save some text messages, & I'm wondering if they can be saved, emailed or printed?

    1. Off hand, I would say that you could, depending how much trouble you want to go thru. I am not sure about your iPhone 5c, but I have done so with my iPad 2. I guess the main thing you would need is various difference e-mail addresses on various devices. In which case, I just send myself a text message from one device to another, which is connected to a printer.
    2. Something else that would help, if you had an e-printer. I do not have one myself, but from what I understands, you just send your text message like an e-mail to the e-printer. Then it prints out the text message.
    3. Furthermore, you might want to check out "Google Cloud Print" at http://www.google.com/cloudprint. It has difference options you can choose from. So you can use this app with an e-printer, or you can use it with a classic (non-e-printer) instead. As far as myself goes, I have it configured to work with a classic printer. And it does just fine, with good results.

Maybe you are looking for

  • Aperture Library not available in iMovie

    I want to add some photos from my Aperture Library into an iMovie project. However, when I click on Aperture Library, it says "Loading", but the wheel keeps spinning forever and nothing happens. I have iMovie version 10.0.1 and Aperture 3.5.1. Apertu

  • Multiple Idocs (DEBMAS06) into one single file

    Hi All, Multiple Idocs(DEBMAS06) are sent from SAP in bulk to be sent to FTP server via XI...(Cannot use Append the file as The structure is with Header,Detail(all the idoc details) and Trailer) I have seen different threads which speaks about the sa

  • Swing Screen size changing in 1.5

    we developed swing screen in jdk1.4 based on the JInternalFrame. The screen is fit well with in the MDI. But jdk1.5 it looks not fitting. Anybody have idea what is the issue.

  • HT3939 i am trying to find the make/manufacture number on my phone and model number.

    i am trying to find my device manufacture/make on the back of the box and model number, can someone please help

  • How to display a pdf file

    hello, I want to display a pdf document, but I don't find anything which could really help me... I want to parse the pdf file into a jpanel or something like that and then displaying that jpanel. has anyone please any idea how I could do that? how do