# "Try catch finally" function available?

**URL:** <https://community.weweb.io/t/try-catch-finally-function-available/18586>\
**Category:** Ask us anything\
**Created:** [June 3, 2025, 4:47pm UTC](https://community.weweb.io/t/try-catch-finally-function-available/18586 "2025-06-03T16:47:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![thijs](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/thijs/32/13651_2.png) [@thijs](https://community.weweb.io/u/thijs)\
**Post date:** [June 3, 2025, 4:47pm UTC](https://community.weweb.io/t/try-catch-finally-function-available/18586/1 "2025-06-03T16:47:02Z")

</div>

Hi!

Is there a no/low code friendly way to apply a ‘try catch finally’ function in Weweb?

I’m asking for a friend, my webapp never bugs 🙂

In all seriousness, it takes quite a detour (with conditional filtering) to imitate this function - causing unnecessary complication in my webapp.

Thanks!

---

<div class="post-metadata">

**Author:** ![sam1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/sam1/32/6724_2.png) [@sam1](https://community.weweb.io/u/sam1)\
**Post date:** [June 3, 2025, 10:13pm UTC](https://community.weweb.io/t/try-catch-finally-function-available/18586/2 "2025-06-03T22:13:29Z")

</div>

There is the error path for workflows you can use but its not a useful as the try catch methods.

> **[Triggers | Documentation](https://docs.weweb.io/workflows/triggers.html#on-error)**
>
> Master WeWeb triggers - learn how to respond to user actions, system events, and lifecycle events, handle errors effectively, and create interactive applications through various trigger types.

---

<div class="post-metadata">

**Author:** ![thijs](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/thijs/32/13651_2.png) [@thijs](https://community.weweb.io/u/thijs)\
**Post date:** [June 4, 2025, 7:43am UTC](https://community.weweb.io/t/try-catch-finally-function-available/18586/3 "2025-06-04T07:43:04Z")

</div>

Thank you @sam1 !

And what about formulas when binding a value? That field allows for ‘Javascript’ and ‘Formulas’ →

I see this example on the [w3schools.com](http://w3schools.com) in Javascript, is it possible to translate this into the Formulas-field?

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/1/159c3294e56bbad9c7b0ec9842f2dd1b10e126bb.png)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/7/7bbb6f8b93b7137bfa08f9ca2c7102888db7d1e2.png)

---

<div class="post-metadata">

**Author:** ![sam1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/sam1/32/6724_2.png) [@sam1](https://community.weweb.io/u/sam1)\
**Post date:** [June 4, 2025, 10:08pm UTC](https://community.weweb.io/t/try-catch-finally-function-available/18586/4 "2025-06-04T22:08:55Z")

</div>

yeah you can do that

```auto
try{
    return x+y;
}catch (err) {
    return err
}

```

bind this to a text and see what happens

---

<div class="post-metadata">

**Author:** ![thijs](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/thijs/32/13651_2.png) [@thijs](https://community.weweb.io/u/thijs)\
**Post date:** [June 7, 2025, 10:43am UTC](https://community.weweb.io/t/try-catch-finally-function-available/18586/5 "2025-06-07T10:43:03Z")

</div>

Hi @sam1 ,

Thanks for this! This function works in the Javascript field, but - since that’s out of my league - it would be amazing if the Weweb editor is able to translate this into its Formulas field. I tried it, but it didn’t recognize. I’ll submit a feature request.
