Ignore:
Timestamp:
Jul 18, 2008, 6:44:24 PM (17 years ago)
Author:
[email protected]
Message:

Bug 18774: SQUIRRELFISH: print meaningful error messages <https://bugs.webkit.org/show_bug.cgi?id=18774>
<rdar://problem/5769353> SQUIRRELFISH: JavaScript error messages are missing informative text

Reviewed by Cameron Zwarich

Add support for decent error messages in JavaScript. This patch achieves this by providing
ensuring the common errors and exceptions have messages that provide the text of expression
that trigger the exception. In addition it attaches a number of properties to the exception
object detailing where in the source the expression came from.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/ExceptionHelpers.h

    r34842 r35245  
    3535
    3636    class Node;
     37    class CodeBlock;
     38    class Instruction;
     39    class JSNotAnObjectErrorStub;
    3740
    3841    JSValue* createInterruptedExecutionException(ExecState* exec);
    3942    JSValue* createStackOverflowError(ExecState*);
    40     JSValue* createUndefinedVariableError(ExecState*, const Identifier&);
    41     JSValue* createInvalidParamError(ExecState*, const char* op, JSValue*);
    42     JSValue* createNotAConstructorError(ExecState*, JSValue*, Node* expr);
    43     JSValue* createNotAFunctionError(ExecState*, JSValue*, Node* expr);
     43    JSValue* createUndefinedVariableError(ExecState*, const Identifier&, const Instruction*, CodeBlock*);
     44    JSNotAnObjectErrorStub* createNotAnObjectErrorStub(ExecState*, bool isNull);
     45    JSValue* createInvalidParamError(ExecState*, const char* op, JSValue*, const Instruction*, CodeBlock*);
     46    JSValue* createNotAConstructorError(ExecState*, JSValue*, const Instruction*, CodeBlock*);
     47    JSValue* createNotAFunctionError(ExecState*, JSValue*, const Instruction*, CodeBlock*);
     48    JSObject* createNotAnObjectError(ExecState*, JSNotAnObjectErrorStub*, const Instruction*, CodeBlock*);
    4449
    4550} // namespace KJS
Note: See TracChangeset for help on using the changeset viewer.