Changeset 35022 in webkit for trunk/JavaScriptCore/kjs/Error.h


Ignore:
Timestamp:
Jul 5, 2008, 10:26:58 PM (17 years ago)
Author:
[email protected]
Message:

2008-07-05 Sam Weinig <[email protected]>

Reviewed by Cameron Zwarich.

First step in broad cleanup effort.

[ File list elided ]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/Error.h

    r35007 r35022  
    2626namespace KJS {
    2727
    28   class ExecState;
    29   class JSObject;
    30   class UString;
     28    class ExecState;
     29    class JSObject;
     30    class UString;
    3131
    32   /**
    33    * Types of Native Errors available. For custom errors, GeneralError
    34    * should be used.
    35    */
    36   enum ErrorType { GeneralError   = 0,
    37                    EvalError      = 1,
    38                    RangeError     = 2,
    39                    ReferenceError = 3,
    40                    SyntaxError    = 4,
    41                    TypeError      = 5,
    42                    URIError       = 6};
     32    /**
     33     * Types of Native Errors available. For custom errors, GeneralError
     34     * should be used.
     35     */
     36    enum ErrorType {
     37        GeneralError   = 0,
     38        EvalError      = 1,
     39        RangeError     = 2,
     40        ReferenceError = 3,
     41        SyntaxError    = 4,
     42        TypeError      = 5,
     43        URIError       = 6
     44    };
    4345
    44   /**
    45    * @short Factory methods for error objects.
    46    */
    47   class Error {
    48   public:
    49     /**
    50      * Factory method for error objects.
    51      *
    52      * @param exec The current execution state
    53      * @param errtype Type of error.
    54      * @param message Optional error message.
    55      * @param lineNumber Optional line number.
    56      * @param sourceId Optional source id.
    57      * @param sourceURL Optional source URL.
    58      */
    59     static JSObject *create(ExecState *, ErrorType, const UString &message, int lineNumber, int sourceId, const UString &sourceURL);
    60     static JSObject *create(ExecState *, ErrorType, const char *message);
    61   };
     46    class Error {
     47    public:
     48        static JSObject* create(ExecState*, ErrorType, const UString& message, int lineNumber, int sourceId, const UString& sourceURL);
     49        static JSObject* create(ExecState*, ErrorType, const char* message);
     50    };
    6251
    63 JSObject *throwError(ExecState *, ErrorType, const UString &message, int lineNumber, int sourceId, const UString &sourceURL);
    64 JSObject *throwError(ExecState *, ErrorType, const UString &message);
    65 JSObject *throwError(ExecState *, ErrorType, const char *message);
    66 JSObject *throwError(ExecState *, ErrorType);
     52    JSObject* throwError(ExecState*, ErrorType, const UString& message, int lineNumber, int sourceId, const UString& sourceURL);
     53    JSObject* throwError(ExecState*, ErrorType, const UString& message);
     54    JSObject* throwError(ExecState*, ErrorType, const char* message);
     55    JSObject* throwError(ExecState*, ErrorType);
    6756
    6857} // namespace KJS
Note: See TracChangeset for help on using the changeset viewer.