# Interpolating objects in error messages (e.g. like console.error)

**URL:** <https://es.discourse.group/t/interpolating-objects-in-error-messages-e-g-like-console-error/822>\
**Category:** 💡 Ideas\
**Created:** [June 18, 2021, 12:08am UTC](https://es.discourse.group/t/interpolating-objects-in-error-messages-e-g-like-console-error/822 "2021-06-18T00:08:35Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![aclaymore](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/aclaymore/32/501_2.png) [@aclaymore](https://es.discourse.group/u/aclaymore)\
**Post date:** [June 18, 2021, 8:03am UTC](https://es.discourse.group/t/interpolating-objects-in-error-messages-e-g-like-console-error/822/3 "2021-06-18T08:03:20Z")

</div>

Perhaps the Error cause proposal could help with that particular example?

> **[tc39/proposal-error-cause](https://github.com/tc39/proposal-error-cause)**
>
> TC39 proposal for accumulating errors. Contribute to tc39/proposal-error-cause development by creating an account on GitHub.

```javascript
throw new Error('Value was not a string', { cause: value })

```

---

_[View the full topic](https://es.discourse.group/t/interpolating-objects-in-error-messages-e-g-like-console-error/822)._
