1
0
Fork 0

IE6 Error.prototype.toString() !== Error.message

closure/master
Mike Gerwitz 2011-03-06 10:37:20 -05:00
parent 6a3789a730
commit 6b79999adb
4 changed files with 10 additions and 10 deletions

View File

@ -274,7 +274,7 @@ for ( var i = 0; i < class_count; i++ )
catch ( e )
{
assert.notEqual(
e.toString().match( args.length + ' given' ),
e.message.match( args.length + ' given' ),
null,
"Class invocation should give argument count on error"
);

View File

@ -66,7 +66,7 @@ var common = require( './common' ),
catch ( e )
{
assert.notEqual(
e.toString().match( name ),
e.message.match( name ),
null,
"Class definition argument count error string contains class name"
);
@ -96,7 +96,7 @@ var common = require( './common' ),
}
catch ( e )
{
var errstr = e.toString();
var errstr = e.message;
assert.notEqual(
errstr.match( name ),
@ -256,7 +256,7 @@ var common = require( './common' ),
catch ( e )
{
assert.notEqual(
e.toString().match( name ),
e.message.match( name ),
null,
"Abstract class instantiation error should contain class name"
);
@ -276,7 +276,7 @@ var common = require( './common' ),
catch ( e )
{
assert.notEqual(
e.toString().match( '(anonymous)' ),
e.message.match( '(anonymous)' ),
null,
"Abstract class instantiation error should recognize that class " +
"is anonymous if no name was given"

View File

@ -192,7 +192,7 @@ for ( var i = 0; i < base_types.length; i++ )
catch ( e )
{
assert.notEqual(
e.toString().match( args.length + ' given' ),
e.message.match( args.length + ' given' ),
null,
"Interface invocation should give argument count on error"
);

View File

@ -67,7 +67,7 @@ var common = require( './common' ),
catch ( e )
{
assert.notEqual(
e.toString().match( name ),
e.message.match( name ),
null,
"Interface definition argument count error string contains " +
"interface name"
@ -98,7 +98,7 @@ var common = require( './common' ),
}
catch ( e )
{
var errstr = e.toString();
var errstr = e.message;
assert.notEqual(
errstr.match( name ),
@ -210,7 +210,7 @@ var common = require( './common' ),
{
// ensure the error string contains the interface name
assert.notEqual(
e.toString().match( name ),
e.message.match( name ),
null,
"Error contains interface name when available (" + i + ")"
);
@ -234,7 +234,7 @@ var common = require( './common' ),
catch ( e )
{
assert.notEqual(
e.toString().match( name ),
e.message.match( name ),
null,
"Interface name is included in instantiation error message"
);