Changeset 35022 in webkit for trunk/JavaScriptCore/kjs/Error.h
- Timestamp:
- Jul 5, 2008, 10:26:58 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/Error.h
r35007 r35022 26 26 namespace KJS { 27 27 28 class ExecState;29 class JSObject;30 class UString;28 class ExecState; 29 class JSObject; 30 class UString; 31 31 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 }; 43 45 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 }; 62 51 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); 67 56 68 57 } // namespace KJS
Note:
See TracChangeset
for help on using the changeset viewer.