# Retrieving RAISERROR from Stored Procedure

**URL:** <https://forum.inductiveautomation.com/t/retrieving-raiserror-from-stored-procedure/16971>\
**Category:** Ignition\
**Tags:** ignition79, database, scripting\
**Created:** [February 13, 2018, 10:15pm UTC](https://forum.inductiveautomation.com/t/retrieving-raiserror-from-stored-procedure/16971 "2018-02-13T22:15:36Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 13, 2018, 10:42pm UTC](https://forum.inductiveautomation.com/t/retrieving-raiserror-from-stored-procedure/16971/4 "2018-02-13T22:42:18Z")

</div>

Use separate catch clauses. One for java exceptions, one for python:

```auto
import java.lang.Exception
try:
    call = system.db.createSProcCall(procedureName='save')
    call.registerInParam('name', system.db.VARCHAR, None)
    system.db.execSProcCall(call)
except java.lang.Exception, e:
    /* Print exceptions originating in Java */
    print e
except Exception, e:
    /* Print other exceptions */
    print e

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/retrieving-raiserror-from-stored-procedure/16971)._
