List Icon
Mailing list Archive

2019 up to July 2022 | 20182017  |  2016  2015 2014 | 2013

The mailing list has been closed since July 2022, but continues to serve as an archive of information about QF-Test.
But if you want to stay informed about news about QF-Test, you can simply
Subscribe to Newsletter  

To get up-to-date information about each release - including minor releases - you can
subscribe to the RSS feed or follow us on social media.
Alternatively, QF-Test also provides release information itself.

Another source of information is our blog, where there are current articles on general topics, on the company QFS and also various "how-tos"
subscribe to blog


[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

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

========================================================================