Lines Matching defs:error
99 Error.captureStackTrace(this, stripPoint);
148 // Test that the error constructor is not shown in the trace
178 // If an error occurs while the stack trace is being formatted it should
190 assertTrue(e.stack.indexOf('<error: ReferenceError') != -1,
191 "ErrorsDuringFormatting didn't contain error: ReferenceError");
202 assertTrue(e.stack.indexOf('<error>') != -1,
203 "ErrorsDuringFormatting didn't contain <error>");
209 // Poisonous object that throws a reference error if attempted converted to
293 var error = new Error();
294 error.toString = function() { assertUnreachable(); };
295 error.stack;
297 error = new Error();
298 error.name = { toString: function() { assertUnreachable(); }};
299 error.message = { toString: function() { assertUnreachable(); }};
300 error.stack;
302 error = new Error();
305 error.stack;
308 error = new Error({ toString: function() { fired = true; } });
310 error.stack;
315 Error.prepareStackTrace = function() { throw new Error("abc"); };
319 throw new Error();
329 // Test that modifying Error.prepareStackTrace by itself works.
330 Error.prepareStackTrace = function() { Error.prepareStackTrace = "custom"; };
331 new Error().stack;
333 assertEquals("custom", Error.prepareStackTrace);
336 error = new Error();
337 error.stack = undefined;
338 assertEquals(undefined, error.stack);
343 assertThrows(function() { Error.captureStackTrace(my_error); });
347 assertThrows(function() { Error.captureStackTrace(my_error); });
350 my_error = new Error();