例外オブジェクト

未定義の変数aをevalしたときにcatchした各ブラウザでの例外オブジェクトの比較

firefoxの場合

例外オブジェクト自体をtoString()した値
ReferenceError: a is not defined
各プロパティ

name: ReferenceError
message: a is not defined
fileName: http://www.aaa.com/js/error.html
lineNumber: 5
stack: test("a")@http://www.aaa.com/js/error.html:5
       test("a")@http://www.aaa.com/js/error.html:5
       onsubmit([object Event])@http://www.aaa.com/js/error.html:1
       @:0

operaの場合

例外オブジェクト自体をtoString()した値
[Error:…]
各プロパティ

name: ReferenceError
message: Statement on line 3: Reference to undefined variable: a
Backtrace:
  At unknown location
    [statement source code not available]
  Line 1 of  script 
    test(this.i.value);
  At unknown location
    [statement source code not available]

IE6の場合

例外オブジェクト自体をtoString()した値
[object Error]
各プロパティ

name: TypeError
message: 'a' は宣言されていません。
number: -2146823279
description: 'a' は宣言されていません。