зеркало из https://github.com/mozilla/gecko-dev.git
Adding an improvement by joerg.schaible@gmx.de, plus a new section.
This commit is contained in:
Родитель
8133625a6d
Коммит
07e57234e7
|
@ -58,9 +58,8 @@ function _Error(msg)
|
|||
{
|
||||
this.message = msg;
|
||||
}
|
||||
_Error.prototype = new Error();
|
||||
_Error.prototype.name = '_Error';
|
||||
_Error.prototype.message = '';
|
||||
_Error.prototype.toString = function() {return this.name + ': ' + this.message;};
|
||||
|
||||
|
||||
// derive MyApplyError from _Error
|
||||
|
@ -135,6 +134,21 @@ actual = examineThis(err7, 'msg7');
|
|||
expect = EXPECTED_FORMAT;
|
||||
addThis();
|
||||
|
||||
status = inSection(8);
|
||||
var err8;
|
||||
try
|
||||
{
|
||||
throw MyApplyError('msg8');
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
if(e instanceof Error)
|
||||
err8 = e;
|
||||
}
|
||||
actual = examineThis(err8, 'msg8');
|
||||
expect = EXPECTED_FORMAT;
|
||||
addThis();
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
Загрузка…
Ссылка в новой задаче