Norris,

I realize this is probably a nuisance, but the following problem causes our
regression test suite to fail:

    js> foo = new Error("bar")
    undefined: bar
    js> foo.name Error
    js> foo.toString()
    undefined: bar

Our test suite expects:

    js> foo = new Error("bar")
    Error: bar
    js> foo.name Error
    js> foo.toString()
    Error: bar

I have not yet tried the debugger with the RC2 release, but I expect to get
to that later today.

I hope I'm not to late to influence the 1.5R3 release.

Thanks,

dave
This commit is contained in:
nboyd%atg.com 2002-01-19 17:43:26 +00:00
Родитель b4ed051d8d
Коммит b0c8c14266
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -128,7 +128,12 @@ public class NativeError extends IdScriptable {
}
public String toString() {
return getName() + ": " + getMessage();
// The "name" property is usually just defined in the prototype,
// so use getProperty to fetch it.
Object name = ScriptableObject.getProperty(this, "name");
if (name == NOT_FOUND)
name = Undefined.instance;
return name + ": " + getMessage();
}
public String getName() {