# C embedding - how to get the full exception message?

**URL:** https://discourse.julialang.org/t/c-embedding-how-to-get-the-full-exception-message/6511
**Category:** New to Julia
**Created:** [October 17, 2017, 8:46pm UTC](https://discourse.julialang.org/t/c-embedding-how-to-get-the-full-exception-message/6511 "2017-10-17T20:46:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jinliangwei](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jinliangwei/32/1929_2.png) [@jinliangwei](https://discourse.julialang.org/u/jinliangwei)
#### Post date: [October 17, 2017, 8:46pm UTC](https://discourse.julialang.org/t/c-embedding-how-to-get-the-full-exception-message/6511/1 "2017-10-17T20:46:12Z")

</div>

When embedding Julia in C, I know I can check whether some exception occurred in Julia using jl\_exception\_occurred() and jl\_typeof\_str() gives me what kind of exception it is, like UndefVar. But how do I get more details of the exception, for example, the symbol of the undefined variable, etc? Thanks!

---

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [October 17, 2017, 8:59pm UTC](https://discourse.julialang.org/t/c-embedding-how-to-get-the-full-exception-message/6511/2 "2017-10-17T20:59:43Z")

</div>

Call Julia functions like `showerror` on the exception

---

<div class="post-metadata">

### Author: ![jinliangwei](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jinliangwei/32/1929_2.png) [@jinliangwei](https://discourse.julialang.org/u/jinliangwei)
#### Post date: [October 18, 2017, 4:03am UTC](https://discourse.julialang.org/t/c-embedding-how-to-get-the-full-exception-message/6511/3 "2017-10-18T04:03:18Z")

</div>

Thanks!
