# IRTools: How to wrap a function into Try / Catch block

**URL:** <https://discourse.julialang.org/t/irtools-how-to-wrap-a-function-into-try-catch-block/65489>\
**Category:** General Usage\
**Tags:** question\
**Created:** [July 29, 2021, 10:51am UTC](https://discourse.julialang.org/t/irtools-how-to-wrap-a-function-into-try-catch-block/65489 "2021-07-29T10:51:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![schlichtanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/schlichtanders/32/32145_2.png) [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Post date:** [July 29, 2021, 10:51am UTC](https://discourse.julialang.org/t/irtools-how-to-wrap-a-function-into-try-catch-block/65489/1 "2021-07-29T10:51:47Z")

</div>

Hi all,  
I am using IRTools and would like to change my IR in such a way that the whole **body is wrapped** in a simple

```julia
try
  ...
catch e
  return nothing
end

```

I couldn’t find help in the documentation [Home · IRTools](https://juliahub.com/docs/IRTools/oFGpw/0.4.0/#Manipulating-IR-1) and hence hope that someone might be able to help.  
Thanks a lot
