# How to get the error code & error message return from Vbscript to Automise?

**URL:** <https://www.finalbuilder.com/forums/t/how-to-get-the-error-code-error-message-return-from-vbscript-to-automise/4458>\
**Category:** Discussion\
**Created:** [September 28, 2010, 8:07am UTC](https://www.finalbuilder.com/forums/t/how-to-get-the-error-code-error-message-return-from-vbscript-to-automise/4458 "2010-09-28T08:07:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeegs](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/b19c9b/32.png) [@jeegs](https://www.finalbuilder.com/forums/u/jeegs)\
**Post date:** [September 28, 2010, 8:07am UTC](https://www.finalbuilder.com/forums/t/how-to-get-the-error-code-error-message-return-from-vbscript-to-automise/4458/1 "2010-09-28T08:07:32Z")

</div>

Hi,

&nbsp;

I&nbsp;am using Automise for one of my project that move the files and organize that files in the related folder.

In this project, I am using Move Files & Run Script actions.

&nbsp;

Once the files move to the folder, I am executing&nbsp;a vbscript that exists in that folder from Run Script Action to organize that files

&nbsp;

My question is how can I get the error code and&nbsp;the&nbsp;error message return to the automise if the vbscript fail?&nbsp;

&nbsp;

&nbsp;

Thanks,

Jeegs

&nbsp;

---

<div class="post-metadata">

**Author:** ![stephen.ryan](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/f14d63/32.png) [@stephen.ryan](https://www.finalbuilder.com/forums/u/stephen.ryan)\
**Post date:** [October 4, 2010, 11:20am UTC](https://www.finalbuilder.com/forums/t/how-to-get-the-error-code-error-message-return-from-vbscript-to-automise/4458/2 "2010-10-04T11:20:15Z")

</div>

Hi,

I have attached a simple example of how to use some simple error handling within your VBScript code to catch the error details. I have also used a Try/Catch block to capture the error details and save these details into Automise variables.

Please let me know if this solves your problem.

Regards,

Steve

[HandleErrors.atz3](https://www.finalbuilder.com/forums/uploads/default/original/2X/f/f6322dce3b3f777668b0c827f0eb95c8bf4aaeea.atz3) (2.191 KB)
