# Passing an Error to Final Builder from a script

**URL:** https://www.finalbuilder.com/forums/t/passing-an-error-to-final-builder-from-a-script/1087
**Category:** Discussion
**Created:** [January 23, 2009, 6:08am UTC](https://www.finalbuilder.com/forums/t/passing-an-error-to-final-builder-from-a-script/1087 "2009-01-23T06:08:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [January 23, 2009, 6:08am UTC](https://www.finalbuilder.com/forums/t/passing-an-error-to-final-builder-from-a-script/1087/1 "2009-01-23T06:08:20Z")

</div>

Hello,

I am using VBScript to automate some tests and I'd like to be able to tell Final Builder when something has failed a test inside one of these scripts.&nbsp; I have my script set to return an error code:

wscript.quit(2)

but Final Builder is not recognizing this as an error.&nbsp; Any help would be greatly appreciated.

~Evelyn

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [January 27, 2009, 2:08am UTC](https://www.finalbuilder.com/forums/t/passing-an-error-to-final-builder-from-a-script/1087/2 "2009-01-27T02:08:21Z")

</div>

How are you running the script? If you are using the Execute process then it should receive the returncode… if you add this code to the after action script event :   
  
 msgbox Action.ReturnCode   
  
 What do you see. Another option would be to run the script from within FinalBuilder using the Run Script action. Bear in mind that only some WScript methods are implemented… so WScript.Quit will not work, however you have full access to FinalBuilder variables in the script so you can set a FinalBuilder variable to the error code.   
  
 HTH
