title: window.onerror in Safari ( Javascript )
body: <p>I create an error message its working with IE and Mozila.
  Not woking with Safari, Chrome and Opera.</p>
  
  <p>But I need to use it. Please give me right way for doing it.</p>
  
  <pre><code>&lt;script language="javascript" type="text/javascript"&gt;
  window.onerror = function(msg, url, line)
  {
      document.write("Message\t = "+msg + "&lt;br/&gt;Location\t = " + url + "&lt;br/&gt;Line No.\t = " + line + "&lt;br/&gt;Error No.\t = " + this.err.number);
  }
  this.err = Error(12,"My Own Error");
  throw this.err;
  &lt;/script&gt;
  
  ==========================================
  Internet Explorer:
  
  My Error
  Message = My Own Error
  Location = http://localhost/practice/JavaScript/window.errors.php
  Line No. = 8
  Error No. = 12 
  ================================================
  Mozilla FireFox:
  
  My Error
  Message = Script error.
  Location = My Own Error
  Line No. = 0
  Error No. = undefined 
  =====================================================
  Safari, Chrome, Opera:
  
  My Error
  </code></pre>
  
  <p>look the code Mozilla give wrong information. what I do?</p>