Menu

How to handle the STAXPythonExceptionError

Help
Aneesh
2016-11-10
2016-11-10
  • Aneesh

    Aneesh - 2016-11-10
    1. STAXPythonExceptionError was thrown when database connection timeout occured in the python file. I just want to handle this exception in the stax insted of python itself.
    2. Also what is the common exception to handle all kinds of exception in stax and how to know what exception exactly it was raising.
     
  • Sharon Lucas

    Sharon Lucas - 2016-11-10

    You may override a STAX default signalhandler for a signal (such as a STAXPythonEvaluationError signal) by providing your own signalhandler. See section "How to Perform Cleanup Before Job Termination" for some examples of ways to handle a STAXPythonEvaluationError signal in the STAX User's Guide at http://staf.sourceforge.net/current/STAX/staxug.html#Header_CleanupExamples. The third example shows how you can provide a signal handler for a STAXPythonEvaluationError signal that throws a STAX Exception and then use <try>/<catch> elements to handle the exception.

    For more information on STAX signals, see section "Signals" in the STAX User's Guide at http://staf.sourceforge.net/current/STAX/staxug.html#Header_Stax_Signals.

    Note that STAX signals are different from STAX Exceptions. For more information on STAX Exceptions see the "Exceptions" section in the STAX User's Guide at http://staf.sourceforge.net/current/STAX/staxug.html#Header_Stax_Exceptions

     

Log in to post a comment.