title: Javascript - can you throw an object in an Error?
body: <p>Is it possible to throw an object using <code>Error</code>? In the example below the console shows <code>undefined</code>.</p>
  <pre><code>try {
      throw Error({foo: 'bar'});
  } catch (err) {
      console.log(err.message.foo);
  }
  </code></pre>