# Error Dejection Operator

**URL:** <https://es.discourse.group/t/error-dejection-operator/788>\
**Category:** 💡 Ideas\
**Created:** [May 12, 2021, 2:05pm UTC](https://es.discourse.group/t/error-dejection-operator/788 "2021-05-12T14:05:25Z")\
**Posts on this page:** 1\
**Showing post:** 38

<div class="post-metadata">

**Author:** ![theScottyJam](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/thescottyjam/32/616_2.png) [@theScottyJam](https://es.discourse.group/u/theScottyJam)\
**Post date:** [August 11, 2021, 10:00pm UTC](https://es.discourse.group/t/error-dejection-operator/788/38 "2021-08-11T22:00:27Z")

</div>

Thanks for those comments @jithujoshyjy - I'm starting to understand your inspiration better.

For now, I'm actually not going to make a proposal for this (if someone else wants to, feel free). Instead, I've recently proposed over on [this thread](https://es.discourse.group/t/statements-as-expressions/894/26) that we make Javascript a little more expression-oriented by turning a handful of statements into expressions, including try-catch. The details about how each statement will get turned into an expression can be debated.

The proposal repo is [here](https://github.com/theScottyJam/proposal-statements-as-expressions), and there's an issue on it [here](https://github.com/theScottyJam/proposal-statements-as-expressions/issues/2) that discusses what would be the best way of providing an expression form of try-catch. It links to some different possible ideas that have been brought up in these forms, including this "|^" idea and the "const { value, error } = try whatever()" idea from the other thread. I assume only one will likely make it through, so it's just figuring out which would be the best fit.

---

_[View the full topic](https://es.discourse.group/t/error-dejection-operator/788)._
