Catching Exception and then forwarding it to parent

I am having one sub class to do some database activities,
what i want to do is catch SQLException -> do roll back and then I want to pass this to parent. Parent is doing some additional logic such as logging, forwarding it to error page etc.
i tried
public void mychildclass thorws Exception
try{
} catch (SQLException e) {
conn.rollback();
super(e); ///getting error here
}but does not seem to be working. Also I want to know what will happen to other exceptions ? if i do not catch in child ? automatically will go to parent catch?
regards
Manisha

yes, i was bit confused i think,
btw, still one qry i have
i have
try{
}catch(SQLException e) {
block - but my inside code throws something else (may
be NumberFormatException) which is not tackled then
whether it will go to parent class ?If you don't catch it, it's thrown to the calling method. Not the parent class, the calling method.

Similar Messages

  • When i take a picture with my iphone and then forward the picture in an email (regardless of picture size) it will not send - any thoughts????? Thanks.

    When I take a picture with my iPhone and then forward the picture to an emaila ddress (regardless of picture size) it will not send the email with the pciture enclosed - any thoughts on how to fix ?????
    Thanks -

    The collum to the right listed similar problems.  The solution appears to be that under smtp outgoing settings the user name and password are listed as optional.  I have not plugged in the information and it seems to be working.  However from my office it always allowed the relaying.  The true test will be when I try to respond later from the road.
    Thank you for your help.

  • How can I apply a timestretch to different null objects and then use them to parent layers?

    I am using several hundred stills which are held on screen for different lengths of time. Is there a way to create null objects with various timestretch values and then use them to parent my stills?
    I'm trying to find an equivalent to the 'paste attributes' function in Final Cut Pro.
    Thanks in advance
    A

    If you have movement on the stills you can set up expressions based on in and out points. That's what I do. I then drop all my stills in order into a comp then set the out point for all stills for the longest duration. I then set group colors for layers that I want to make different lengths, do a group select and then adjust the out points for those layers. When I'm done I sequence the layers using the keyframe assistant.
    The other way I work is to use an audio track with markers for timing. I have an expression that reads the markers and sets opacity for the layers based on pairs of markers. The motion is also controlled by expressions. That's an even faster way to set up an animated slide show.
    The last way I work is just to set in an out points for all layers, sequence the layers, use expressions to do the motion and then use time remapping on a pre-comp to adjust the timing of the slide show. All methods are quick and easy.
    Here's a fly in bounce and then drop out fxx preset that will give you an idea of how expressions based on in and out point work for slide shows. You just drag the layer to it's resting position, apply the animatiokn preset and the layer flys in, bounces, and then drops out the bottom of the comp. Works in 2D and 3D space.

  • Custom exceptions and carrying forward stack trace

    Hi, I have a question on exception handling.
    I have written an application which has several custom exceptions. When an exception occurs, sometimes I throw it and then when its caught, wrapping it in another exception like so:
    } catch (Exception e){
    throw new CollectionFailedException(this.getName() + " could not get collection", e);
    This works fine, but when I output the stacktrace, it only goes as far as the new exception, making things more difficult to debug. Is there any way of incrementing the stack trace using the first exception?
    Many thanks for any help offered!
    Marc

    Marc, this is expected behaviour. When you throw a new exception, the stacktrace starts off at the new one. A really nice explanation and sample code for creating new Exceptions and extending the Exception class is located at:
    http://www.javaworld.com/javaworld/jw-09-2001/jw-0914-exceptions.html
    Good luck, fstream

  • Submitting information on Form and then forwarding the form

    I am attempting to automate a process which requires filling out a form and then submitting to a team lead for approval.
    Currently a configurator submits a hare copy of a request to enhance code or table.
    I want to automate so that configurator loga into portal fills out form and then submits. The request is filled out and submitted via portal to approval authority.
    Do I use ADS with portal via Visual composer or some other tool.
    Thanks
    Weyland Yutani

    Hi,
      I am also trying to to do something similar . As from Ottos's reply I understand that the second WDA (Approvers screen) will also have a Interactive Form which is created based on data that was stored on the first screen.
    Apart from the data, is there a way to make all attrributes of a form persistent so that we can use this to generate the PDF form when ever needed ?
    Reason I am asking is because, apart from the data I may have to capcture signature etc., on the form.
    Thanks,
    Arpitha.

  • SOAP to FILE using BPM to catch exception and save error into the table

    Hi All
    My scenario SOAP to FILE using BPB is working fine but now I have a requirement to catch an exception if something wrong happened on a runtime and save it into the tracking table, is that possible, if it is please point me to the similar step by step scenario.
    Thanks in advince,
    Yonela

    Yonela:
    As your original requirement is to save the eorr data into your database table, however, you was mis-leaded to alerting field.
    You are using BPM now, then that is the reason that I suggested to use excpetion branch.
    It does not matter SOAP to File seneario, it does not have to be SAP - RFC scenario, your BPM willl interact with database system.
    First you have block which include all the steps that possible generate exception: like Transformation step, and your final Aync send step (which will send data to file).
    Secondly, define a exception handler for that block.
    3. Modify each steps that posssible generate exception: e.g. transformation step, send step, add exception handler to them.
    4. Create exception branch in side the block
    5. Add another send step inside your exception branch, which will call RFC, RFC will write data to your table.
    6. If you want, you can add a control step in exception branch to trigger a alert, or terminate current process.
    At run time, any steps that trigger exeption,will cause your exception branch executed, and RFC will be called to insert data into your database table.
    Regards
    Liang

  • Catch exception and continue the execution

    Hi Team,
    I require the action(such as insert/Update/Delete) for each row of table/table variable and also Error/Exception details as new column if occured any.
    Please refer below sample input and output.
    i was using merge, when exception occurs it fails to fit my requirement.
    My input data will be huge(such as 10k-15k), please suggest me optimized way to achieve this
    Kindly assist me.
    Thanks

    Hi,
    1. We don't know what make wrong and what exception occurs! We only have a nice story here :-)
    2. We don't have any information about your DDL and/or your source data an destination table, therefor we cant tell you  what is the best option.
    3. For 10-15K records doing a loop as suggested can be slow (for a 1000k it will be take for ever). It is highly faster most of the time for a big SET of data to use 3 queries (if MERGE is not an optioned), one for each operation (insert,update,delete),
     and to work with bulk insert! In this case the only heavy operation will be the fact that you need to use 3 time filtering but if your index fit the query this might be the best solution sometimes (again if merge is not an option). If the data come from
    external Data as CSV for example, then You can split the data into 3 sources before the queries, using 1 query or a small shell script prepering 3 sources. There can be several option fit your needs and uses which might fit better, but ont go to fast to work
    with looping record by record. try to thing of working with SETs of data.
    As mentioned, please post more information, In order to get the best solution for your specific case
    [Personal Site] [Blog] [Facebook]

  • Adobe form for user entry  and then forward to email distro

    I would like to develop a form that will have a pull down list of entries from an SAP table and also fill out information is several text fields on the form.
    Once a user fills out the form, I would like the user to be able to send the completed form to an email or even a distribution list.
    I also would like to add a jpg or image to the top of the form.
    Can anyone provide me some tips on how to go about doing this. I am concerned it will take a lot more programming than I have current knowledge (I can do it but learning curve may take to long).
    I would think Adobe smartforms  is the best choice unless there is a better option that I don't know about
    Thank for all of your help
    Weyland Yutani

    I would like to develop a form that will have a pull down list of entries from an SAP table and also fill out information is several text fields on the form.
    Well if this is an online form then it is a standard thing Adobe Form can handle. But if you are talking of offline form then you will need to use Web Services to fill the dropdown dynamically from SAP.
    Once a user fills out the form, I would like the user to be able to send the completed form to an email or even a distribution list.
    There is a SubmitByEmail button which should trigger the default mail client on user's machine and the form can be sent to a email address.
    I also would like to add a jpg or image to the top of the form.
    There are Image element provided in standard library.
    Can anyone provide me some tips on how to go about doing this. I am concerned it will take a lot more programming than I have current knowledge (I can do it but learning curve may take to long).
    There are excellent tutorials available [here|http://www.sdn.sap.com/irj/sdn/adobe] which can be a good starting point
    I would think Adobe smartforms is the best choice unless there is a better option that I don't know about
    Adobe Forms and SAP Smartforms are different technologies. I am sure you were not referring to SAP Smartforms when you wrote above, were you?

  • Can you catch form has expired exception and reload page?

    I have a cfcalendar wrapped with cfform, every first time start the application, it either is empty or give me form data as expired message.
    I have tried to set cfform timeout to a 100 or 200 seconds, but if you close the application and next time open it (if after the timeout limits) it shows the form data has expired message again. If I don't set or set it to 0, then the next time I open the browser, it give me an empty form page.
    So I wonder if there is a way to catch that exception, and then make it reload the page?
    Any ideals to solve the problem.
    <cfoutput>
    <cfheader name="expires" value="#now()#">
    <cfheader name="pragma" value="no-cache">
    <cfheader name="cache-control" value="no-cache, no-store, must-revalidate">
    </cfoutput>
    <cfform name="testForm" format="flash" onLoad="#disableRanges#" height="320" width="420"   >
         <cfcalendar name="selectedDate" 
                selecteddate="#Form.selectdate#"
                mask="mmm dd, yyyy"
                dayNames="SU,MO,TU,WE,TH,FR,SA"
                monthNames="JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC"
                style="rollOverColor:##FF0000;"
                width="270" height="200"
                onchange="getURL('index.cfm?selectDate=' + (selectedDate.selectedDate.getMonth()+1) + '/' +selectedDate.selectedDate.getDate() + '/' + selectedDate.selectedDate.getFullYear());"
                     >
    </cfform>   
    Thanks,
    Bill

    The first thing I would do would be to use an html form instead of flash.  The second would be to add a submit button.  On change events are very frustrating if you don't make the correct selection on your first attempt.

  • Doubt on try/catch exception object

    why it is not advisable to catch type exception in try catch block. Its confusing me. If i catch exception object then it will show whatever exception occured.
    btw, i was just go through duke stars how it works and saw this
    http://developers.sun.com/forums/top_10.jsp
    Congrats!

    Because there are many different kinds of Exception. If you have some specific local strategy for dealing with a particular excepion then you should be using a specific catch block.
    If you don't then you should allow the expection to end the program, and ideally you should deal with all the expceptions in one top-level handler, so you should throw, rather than catch the exceptions in your methods. Often at the outer most level of the program or thread you will actually catch Throwable (not just Exception) to deal with any unanticipated problems in a general kind of way.
    Also, you should be keeping track of what exceptions might be thrown, so that rather than using Exception in a throws clause or catch block, you should use the particular exceptions. Exceptions, generally, indicate a recoverable error that you really ought to be recovering from rather than just printing a stacktrace.
    That's why exceptions are treated differently from runtime errors.

  • To catch exception from a batch file

    Hi,
    I am running a batch file using java,the batch file is used for running SQL Loader.It is working OK,but I am unable to catch any exception or sucess message.Can anyone help?
    regards,
    Anshuman

    Have your Java main() catch Throwable and then use System.exit(an errror code); inside the catch. Your batch file can then examine the process return code.

  • About catching exception??

    Can anyone help me? I want to create a utility class which catches different sorts of exceptions and pass programmer generated messages through the request object back to the servlet controller which instantiates the utility class whenever an exception occurs.The contoller caches the exception in it's try-catch block and then instantiates the utility class.But how to pass the exception to my utility class and catch it again there and generate more user friendly messages??

    My utility class contains catch blocks for all types
    of exceptions.I want to catch the exact exception and
    create user friendly messages there only.If I pass
    exception object from the controller to the utility
    class how to make it's catch blocks catch the passed
    exception??I understood what you said, but that's not how you usually do it, but you can if you want:
    // Code from some method
            try {
                throw new IOException("Test");
            } catch (Exception e) {
                Utility.handleExeption(e);
    // The utility class
    class Utility {
        public static void handleExeption(Throwable t) {
            try {
                throw t;
            } catch (IOException ex) {
                System.err.println("IOException " + ex);
            } catch (Throwable ex) {
                System.err.println("Throwable " + ex);
    }Note that you probably don't want to catch throwables. It was just to show that it can be done.
    Kaj

  • JSP newbie: Servlet and then?

    hi
    just starting to do a jsp webapp - could manage to have a registration form with a preview button
    by clicking on the submit button the action refers to my servlet class which shows me the entered values
    but now i want to add a save button - but where do i have to do this? please help me at the moment i do not see any solution :(

    This is the perfect example of where you should be using a JSP instead of a servlet.
    It is much harder to read in the above format, where as if you look at it like this:
    </TABLE>
    <FORM ACTION="><a href="imac2\private\test.jsp>">
    <BIG><CENTER>
    <INPUT TYPE="SUBMIT"
               VALUE="Save">
    </CENTER></BIG></FORM>It becomes a lot easier to read, and it is quite clear that the form tag action attribute is a little wonky. you do not put an <a href> tag in the middle of a form tag :-)
    I think your form tag should instead be this:
    <form action="[path/to/requested/resource]">
    or in your terms:
    "<FORM ACTION=\"" + "imac2\\private\\test.jsp" + "\">\n" +
    In most cases the action of a form points to a servlet to invoke.
    You can make it a JSP if you wish, but then the JSP will be handling the form data, and (in the strict model2 architecture) JSPs should only be used for display.
    The basic story:
    If you are using out.println() to output a whole lot of HTML, you should be using a JSP
    If a JSP has a whole bunch of scriptlet code in it, you should be using custom tags or a servlet.
    The standard approach (as I showed above) is to submit to a servlet, have the servlet run java code (to save/load/do whatever) and then forward to a JSP to render the response (using the RequestDispatcher)
    Hope that clears things up a little,
    evnafets

  • Insert and then show the result and refresh page problem

    hi all,
    I collect the form value and put them into db, and then display this student 's inform out from db including the one we just submit, first I do it on this way
      insertpayment(UserId, FeeType, DuteDate, OfficerReason, OtherReason, CompleteDate,
                            InterviewDate, ApprovalDate,PaymentYear);
                   studentRecords= getFound(UserId);
                     userSession.setAttribute("studentRecords", studentRecords);
                     RequestDispatcher disp;
                   // disp = getServletContext().getRequestDispatcher("/WEB-INF/jsp/   studentRecords= getFound(UserId);");
                     disp = getServletContext().getRequestDispatcher("/showPayment");
                    disp.forward(req, res); then whenever I refresh my showRecords.jsp" I call the insert function. THAT IS HORRIABLE.
    I try to move the studentRecords= getFound(UserId); to my showPayment servlet and then forward the result to showRecords.jsp, but I alwarys get error
    PWC4011: Unable to set request character encoding to UTF-8 from context /report, because request parameters have already been read, or ServletRequest.getReader() has already been called
    How should I handle this kind of problem??

    Karan, thank you for the link, i read a few articles, I only get the sample part part use res.sendRedirect("/myfolder/showPayment"); in my insert servlet and use forward to display the page
    userSession.setAttribute("studentRecords", studentRecords);
                  RequestDispatcher disp;
                  disp = getServletContext().getRequestDispatcher("/WEB-INF/jsp/secure/admin/showRecords.jsp");
                   disp.forward(req, res);   
    this solute the refresh page problem, but bring the new problem I can't use the following way to disable the back button. not the perter solution
    maybe I did not understand PRC more advice!!
    response.setHeader("Cache-Control","no-cache"); //Forces caches to obtain a new copy of the page from the origin server
    response.setHeader("Cache-Control","no-store"); //Directs caches not to store the page under any circumstance
    response.setDateHeader("Expires", 0); //Causes the proxy cache to see the page as "stale"
    response.setHeader("Pragma","no-cache"); //HTTP 1.0 backward compatibility

  • Hosting virutal domains, processing and filtering email, and then forwardin

    What I am trying to do is essentially create a mail gateway that filters email, for several virtual domains, for spam/viruses and then forwards on to the appropriate email server.
    This gateway will be on one subnet [1.1.1.1] and the actual email servers will be on other subnets domain1: [smtp 2.2.2.2], domain2: [smtp 3.3.3.3]
    What I want is essentially to recreate a barracuda spam filter.
    I am not having any luck getting the Mac OS X mail server to forward the email for [email protected] to domain1's email server. I can see the email for [email protected] hitting the Mac when I sent a test from a gmail account but have now idea where this email is going after that.
    What am I missing?!!
    Thanks!

    You will need to use transport maps. See this thread for starters:
    http://discussions.apple.com/thread.jspa?messageID=10532491&#10532491
    HTH,
    Alex

Maybe you are looking for