# Error handling, how to do?

**URL:** <https://discourse.slicer.org/t/error-handling-how-to-do/862>\
**Category:** Development\
**Created:** [August 13, 2017, 8:22pm UTC](https://discourse.slicer.org/t/error-handling-how-to-do/862 "2017-08-13T20:22:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandre\_Freitas\_Du](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Alexandre\_Freitas\_Du](https://discourse.slicer.org/u/Alexandre_Freitas_Du)\
**Post date:** [August 13, 2017, 8:22pm UTC](https://discourse.slicer.org/t/error-handling-how-to-do/862/1 "2017-08-13T20:22:19Z")

</div>

Hello everyone, is there any way to handle Exceptions in Loadable? Using “try catch” does not work, always generating the same log, and closing Slicer 3D.

" … exit abnormally - Report the problem. "

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 14, 2017, 1:09am UTC](https://discourse.slicer.org/t/error-handling-how-to-do/862/2 "2017-08-14T01:09:01Z")

</div>

In C++ errors are often not handled using exceptions. In Slicer, errors are handled by returning error codes/specific values indicating errors.

In your loadable modules, you may decide to use exceptions internally but you must catch all the exceptions that you throw.
