Logo QF-Test

Finding valuable answers
in the Mailing List Archive.


Free Trial  Download  Buy

Thomas Max, QF-Test training and support

Use the full-text search on our web site to find helpful tips on the mailing list.

Thomas Max, 
Sr. Software Engineer & Trainer, QFS

2017 up to now  | 2016 | 2015 | 2014 | 2013 | 2012 | 2011 | 2010 | 2009 | 2008 | 2007

(older archive entries before 2007 are not shown here, but included in the onsite-search)

Mailing List - Entries from 2017 up to now

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[QF-Test] Exception thrown in a procedure is not catched properly in the calling Jython script

  • Subject: [QF-Test] Exception thrown in a procedure is not catched properly in the calling Jython script
  • From: Bernhard Schmitt <bernhard.schmitt@?.de>
  • Date: Thu, 19 Jan 2017 14:31:51 +0000



I have the following jython server script:




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:


----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?











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



Videos Downloads Documentation Buy Free Trial