| Index: include/v8.h
|
| diff --git a/include/v8.h b/include/v8.h
|
| index dd8f2685bc37115638f5332ddbefd42a79c16cea..34abe6b69c93ede2fff1a1f7c540bd78cc978a53 100644
|
| --- a/include/v8.h
|
| +++ b/include/v8.h
|
| @@ -3812,10 +3812,33 @@ typedef void (*MessageCallback)(Handle<Message> message, Handle<Value> error);
|
| */
|
| class V8_EXPORT Exception {
|
| public:
|
| - static Local<Value> RangeError(Handle<String> message);
|
| + enum ErrorType {
|
| + kNoError,
|
| + // These errors are spec compliant.
|
| + kError,
|
| + kTypeError,
|
| + kRangeError,
|
| + kSyntaxError,
|
| + kReferenceError,
|
| + kURIError,
|
| + kEvalError,
|
| + // This is v8 specific, but is a native error type.
|
| + kStackOverflowError
|
| + };
|
| +
|
| + /**
|
| + * Returns the type of error this object is.
|
| + * If it is not a native error, kNoError is returned.
|
| + */
|
| + static ErrorType NativeErrorType(Local<Value> value);
|
| +
|
| + static Local<Value> StackOverflowError(Handle<String> message);
|
| static Local<Value> ReferenceError(Handle<String> message);
|
| static Local<Value> SyntaxError(Handle<String> message);
|
| + static Local<Value> RangeError(Handle<String> message);
|
| static Local<Value> TypeError(Handle<String> message);
|
| + static Local<Value> EvalError(Handle<String> message);
|
| + static Local<Value> URIError(Handle<String> message);
|
| static Local<Value> Error(Handle<String> message);
|
| };
|
|
|
| @@ -5414,7 +5437,7 @@ class Internals {
|
| static const int kNullValueRootIndex = 7;
|
| static const int kTrueValueRootIndex = 8;
|
| static const int kFalseValueRootIndex = 9;
|
| - static const int kEmptyStringRootIndex = 141;
|
| + static const int kEmptyStringRootIndex = 142;
|
|
|
| static const int kNodeClassIdOffset = 1 * kApiPointerSize;
|
| static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3;
|
|
|