Logo QF-Test

Im Archiv der Mailingliste
wertvolle Antworten finden.

 

Gratis Testen  Download  Kaufen

Thomas Max, QF-Test Training und Support

Tipp für die Recherche in der Mailingliste: Volltextsuche (oben) verwenden.

Thomas Max,
Sr. Software Engineer & Trainer, QFS

2017 bis heute 2016 2015 2014 | 2013 | 2012 | 2011 2010 2009 | 2008 | 2007

(ältere Archiveinträge vor 2007 nicht dargestellt, aber in der Suche enthalten)

Mailingliste - Einträge 2017 bis heute


[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

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

 


Videos Downloads Dokumentation Kaufen Gratis Testen