cancel
Showing results for 
Search instead for 
Did you mean: 

Stop Execution causes OnStop Handler to fail

SOLVED
Highlighted
Contributor

Stop Execution causes OnStop Handler to fail

I noticed that when I use Stop Execution in our Keyword Tests, our OnStop Event Handler (which is a KWT) raises and exception when it tries to call an advanced script

 

Here are the contents of the KWT handler:

image.png

The exception raised says: 

An exception occurred while executing the script routine
 
I added some logging to trace up to where the script actually gets to, apparently the KWT cannot even load the advanced script.
 
Thinking that this might be caused by a weird behavior of advanced scripts in handlers I decided to make a purely advanced script version of our KWT handler:
image.png
 
And surprisingly this one works. Anyone know what the possible issue might be?
 
I was thinking that you can either go purely KWTs with no advanced scripts or just call an advanced script for the handler.
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

Re: Stop Execution causes OnStop Handler to fail

Hi @wmtan01,

 

I can suggest that you implement the suggestions posted in the Handling Exceptions in Scripts article. I think this may help you better understand why you get the exception.

---------
Tanya Gorbunova
SmartBear Community Manager

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today

View solution in original post

3 REPLIES 3
Highlighted
Community Hero

Re: Stop Execution causes OnStop Handler to fail

There should be additional details in the log if you click the details tab. What does that say?


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
Highlighted
Contributor

Re: Stop Execution causes OnStop Handler to fail

Unfortunately the contents of the details tab is just this:

image.pngimage.png

Highlighted
Community Manager

Re: Stop Execution causes OnStop Handler to fail

Hi @wmtan01,

 

I can suggest that you implement the suggestions posted in the Handling Exceptions in Scripts article. I think this may help you better understand why you get the exception.

---------
Tanya Gorbunova
SmartBear Community Manager

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors