Hello,
I have the following jython server script:
try:
rc.callProcedure("first")
except UserException, e :
errMessage = str(sys.exc_info()[0])
print "debug *" + errMessage + "*"
The procedure „first“ just throws an exception:
--Throw UserException „Test“
è
The exception in the procedure is logged in the run log as exception. The debug message is „debug *<type 'de.qfs.apps.qftest.shared.exceptions.UserException'>*
When I use QF-Test constructs to catche the exception like this:
--Try
----Call procedure: first()
----Catch: UserException
---------Jython Server Script (print rc.getCaughtException().getMessage())
è
The exeption is not logged as exception in the run log. It is caught properly and the exception message („Test“) is printed well.
So my question is: How can I catch a exception thrown in a procedure properly in the calling jython script?
BR
Bernhard
========================================================================
Bernhard Schmitt
Consultant Softwaretest
E-Mail: bernhard.schmitt@?.de
------------------------------------------------------------------------
imbus Rhein-Main GmbH, Kirschgartenstraße 15, 65719 Hofheim, DEUTSCHLAND
Tel. +49 6192 92192-0, Fax +49 6192 92192-50
info@?.de http://www.imbus.de
Geschäftsführer: Frank Schmeißner, Tilo Linz, Thomas Roßner
Sitz der Gesellschaft: Hofheim
Registergericht: Frankfurt am Main, HRB 52155
========================================================================