title: How to get the error message for JSON stringify?
body: <p>Suppose I have an object like this</p>
  
  <pre><code>var obj = {
  "name": "arun"
  age
  }
  </code></pre>
  
  <p>When I try this, JSON.stringify(obj), I will be recieving an error since the obj is not proper. I want to capture the error shown in the console and show it in the UI.</p>
  
  <p>Is there any callback functionality for the stringify function,so that I can do the above?.</p>