# Catching the Error.

**URL:** https://discussions.unity.com/t/catching-the-error/435352
**Category:** Scripting
**Tags:** Scripting
**Created:** [February 2, 2011, 9:27am UTC](https://discussions.unity.com/t/catching-the-error/435352 "2011-02-02T09:27:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![cemC](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/cemc/32/358967_2.png) [@cemC](https://discussions.unity.com/u/cemC)
#### Post date: [February 2, 2011, 9:27am UTC](https://discussions.unity.com/t/catching-the-error/435352/1 "2011-02-02T09:27:16Z")

</div>

Is there any code to catch the error…? An example of catching the error is in Visiual Studio works as try() catch operation?

---

<div class="post-metadata">

### Author: ![Dreamora](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/dreamora/32/91058_2.png) [@Dreamora](https://discussions.unity.com/u/Dreamora)
#### Post date: [February 2, 2011, 9:37am UTC](https://discussions.unity.com/t/catching-the-error/435352/2 "2011-02-02T09:37:19Z")

</div>

try - catch works fine with C# in Unity

But keep in mind, it does not catch errors, it catches exceptions caused by failures that throw them, but there are plentitude of errors you can do that won’t throw exceptions, not considering all the logic based errors 🙂

---

<div class="post-metadata">

### Author: ![cemC](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/cemc/32/358967_2.png) [@cemC](https://discussions.unity.com/u/cemC)
#### Post date: [February 2, 2011, 9:59am UTC](https://discussions.unity.com/t/catching-the-error/435352/3 "2011-02-02T09:59:26Z")

</div>

thanks a lot but are there any code behave like try() catch in javascript?
