# Exception handling question

**URL:** https://www.finalbuilder.com/forums/t/exception-handling-question/2496
**Category:** Discussion
**Created:** [September 7, 2016, 4:01am UTC](https://www.finalbuilder.com/forums/t/exception-handling-question/2496 "2016-09-07T04:01:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![gtsbcrooker](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/g/ed655f/32.png) [@gtsbcrooker](https://www.finalbuilder.com/forums/u/gtsbcrooker)
#### Post date: [September 7, 2016, 4:01am UTC](https://www.finalbuilder.com/forums/t/exception-handling-question/2496/1 "2016-09-07T04:01:00Z")

</div>

I tried to attach an example project (both before and after zipped), but the forums kept showing a server error, so here is the basic structure:  
  
Try  
&nbsp; Try  
&nbsp; &nbsp; Delete File(s) [c:\temp\1.txt]  
&nbsp; Catch  
&nbsp; &nbsp; Raise Exception (%ErrorMsg%)  
&nbsp; End  
Catch  
&nbsp; Raise Exception (%ErrorMsg%)  
Finally  
&nbsp; MessageBox(%ErrorMsg%)  
End &nbsp;  
  
The file c:\temp\1.txt doesn’t exist, so it throws an exception.  
  
On both of the “catch” actions I have checked the option to save the error text to a variable (ErrorMsg).  
  
It seems like the text from the inner raise exception isn’t being saved to the variable during the outer catch. &nbsp;It sees the exception text as being blank.  
  
I am using 7.0.0.3202  
  
Is this expected behavior?  
  
-Britain

---

<div class="post-metadata">

### Author: ![nevar](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/c4cdca/32.png) [@nevar](https://www.finalbuilder.com/forums/u/nevar)
#### Post date: [September 8, 2016, 1:21am UTC](https://www.finalbuilder.com/forums/t/exception-handling-question/2496/2 "2016-09-08T01:21:21Z")

</div>

Hi Britain Crooker,   
  
 Thank you for reporting this. It does appear the exception message is being cleared too early. I will look into this and get back to you.

---

<div class="post-metadata">

### Author: ![nevar](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/c4cdca/32.png) [@nevar](https://www.finalbuilder.com/forums/u/nevar)
#### Post date: [September 8, 2016, 4:36am UTC](https://www.finalbuilder.com/forums/t/exception-handling-question/2496/3 "2016-09-08T04:36:43Z")

</div>

Hi Britain Crooker,   
  
 I have found the issue with the catch action. It was clearing the error message when it should not have been. It will not correctly propagate the error message and error action as you would expect.   
  
 [http://downloads.finalbuilder.com/downloads/finalbuilder/700/FB700\_3519.exe](http://downloads.finalbuilder.com/downloads/finalbuilder/700/FB700_3519.exe)   
  
 [http://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800\_1903.exe](http://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800_1903.exe)

---

<div class="post-metadata">

### Author: ![gtsbcrooker](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/g/ed655f/32.png) [@gtsbcrooker](https://www.finalbuilder.com/forums/u/gtsbcrooker)
#### Post date: [September 8, 2016, 1:35am UTC](https://www.finalbuilder.com/forums/t/exception-handling-question/2496/4 "2016-09-08T01:35:56Z")

</div>

Thanks! I re-ran my test project, and it now displays the message properly at the end.   
  
 -Britain
