| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 enum V8ErrorType { | 32 enum V8ErrorType { |
| 33 v8RangeError, | 33 v8RangeError, |
| 34 v8ReferenceError, | 34 v8ReferenceError, |
| 35 v8SyntaxError, | 35 v8SyntaxError, |
| 36 v8TypeError, | 36 v8TypeError, |
| 37 v8GeneralError | 37 v8GeneralError |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 class V8ThrowException { | 40 class V8ThrowException { |
| 41 public: | 41 public: |
| 42 static v8::Handle<v8::Value> setDOMException(int, v8::Isolate*); | 42 static v8::Handle<v8::Value> setDOMException(int ec, v8::Isolate* isolate) |
| 43 { |
| 44 return setDOMException(ec, 0, isolate); |
| 45 } |
| 46 static v8::Handle<v8::Value> setDOMException(int, const char*, v8::Isolate*)
; |
| 43 | 47 |
| 44 static v8::Handle<v8::Value> throwError(V8ErrorType, const char*, v8::Isolat
e* = 0); | 48 static v8::Handle<v8::Value> throwError(V8ErrorType, const char*, v8::Isolat
e* = 0); |
| 45 static v8::Handle<v8::Value> throwError(v8::Handle<v8::Value>, v8::Isolate*
= 0); | 49 static v8::Handle<v8::Value> throwError(v8::Handle<v8::Value>, v8::Isolate*
= 0); |
| 46 | 50 |
| 47 static v8::Handle<v8::Value> throwTypeError(const char* = 0, v8::Isolate* =
0); | 51 static v8::Handle<v8::Value> throwTypeError(const char* = 0, v8::Isolate* =
0); |
| 48 static v8::Handle<v8::Value> throwNotEnoughArgumentsError(v8::Isolate*); | 52 static v8::Handle<v8::Value> throwNotEnoughArgumentsError(v8::Isolate*); |
| 49 }; | 53 }; |
| 50 | 54 |
| 51 } // namespace WebCore | 55 } // namespace WebCore |
| 52 | 56 |
| 53 #endif // V8ThrowException_h | 57 #endif // V8ThrowException_h |
| OLD | NEW |