# When does the catch block of try catch run in motoko?

**URL:** <https://forum.dfinity.org/t/when-does-the-catch-block-of-try-catch-run-in-motoko/12464>\
**Category:** Developers\
**Created:** [April 27, 2022, 10:21am UTC](https://forum.dfinity.org/t/when-does-the-catch-block-of-try-catch-run-in-motoko/12464 "2022-04-27T10:21:23Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![timo](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/timo/32/5543_2.png) [@timo](https://forum.dfinity.org/u/timo)\
**Post date:** [November 29, 2022, 8:01am UTC](https://forum.dfinity.org/t/when-does-the-catch-block-of-try-catch-run-in-motoko/12464/14 "2022-11-29T08:01:22Z")

</div>

> [@Vivienne](#):
>
> That’s my educated guess, but I’m not 100% sure

It is not even `shared`, so it probably doesn’t. Now I am really wondering what happens if the outgoing call that happens inside `deposit_cycles_to` traps synchronously.

EDIT: This thread seems to answer it: [https://forum.dfinity.org/t/error-the-replica-returned-an-error-code-5-message-canister-trapped-explicitly-could-not-perform-self-call/](https://forum.dfinity.org/t/error-the-replica-returned-an-error-code-5-message-canister-trapped-explicitly-could-not-perform-self-call/)  
There it says every await async { … } is its own message which could get executed in a different round. It doesn’t seem to matter if it is in a function or not. That’s consistent with what you said.

---

_[View the full topic](https://forum.dfinity.org/t/when-does-the-catch-block-of-try-catch-run-in-motoko/12464)._
