OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
6 * | 6 * |
7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
8 * | 8 * |
9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
(...skipping 4146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4157 * constructor with the message. | 4157 * constructor with the message. |
4158 */ | 4158 */ |
4159 class V8_EXPORT Exception { | 4159 class V8_EXPORT Exception { |
4160 public: | 4160 public: |
4161 static Local<Value> RangeError(Handle<String> message); | 4161 static Local<Value> RangeError(Handle<String> message); |
4162 static Local<Value> ReferenceError(Handle<String> message); | 4162 static Local<Value> ReferenceError(Handle<String> message); |
4163 static Local<Value> SyntaxError(Handle<String> message); | 4163 static Local<Value> SyntaxError(Handle<String> message); |
4164 static Local<Value> TypeError(Handle<String> message); | 4164 static Local<Value> TypeError(Handle<String> message); |
4165 static Local<Value> Error(Handle<String> message); | 4165 static Local<Value> Error(Handle<String> message); |
4166 | 4166 |
| 4167 static Local<Message> GetMessage(Handle<Value> exception); |
| 4168 |
| 4169 // DEPRECATED. Use GetMessage()->GetStackTrace() |
4167 static Local<StackTrace> GetStackTrace(Handle<Value> exception); | 4170 static Local<StackTrace> GetStackTrace(Handle<Value> exception); |
4168 }; | 4171 }; |
4169 | 4172 |
4170 | 4173 |
4171 // --- Counters Callbacks --- | 4174 // --- Counters Callbacks --- |
4172 | 4175 |
4173 typedef int* (*CounterLookupCallback)(const char* name); | 4176 typedef int* (*CounterLookupCallback)(const char* name); |
4174 | 4177 |
4175 typedef void* (*CreateHistogramCallback)(const char* name, | 4178 typedef void* (*CreateHistogramCallback)(const char* name, |
4176 int min, | 4179 int min, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4217 PromiseRejectMessage(Handle<Promise> promise, PromiseRejectEvent event, | 4220 PromiseRejectMessage(Handle<Promise> promise, PromiseRejectEvent event, |
4218 Handle<Value> value, Handle<StackTrace> stack_trace) | 4221 Handle<Value> value, Handle<StackTrace> stack_trace) |
4219 : promise_(promise), | 4222 : promise_(promise), |
4220 event_(event), | 4223 event_(event), |
4221 value_(value), | 4224 value_(value), |
4222 stack_trace_(stack_trace) {} | 4225 stack_trace_(stack_trace) {} |
4223 | 4226 |
4224 V8_INLINE Handle<Promise> GetPromise() const { return promise_; } | 4227 V8_INLINE Handle<Promise> GetPromise() const { return promise_; } |
4225 V8_INLINE PromiseRejectEvent GetEvent() const { return event_; } | 4228 V8_INLINE PromiseRejectEvent GetEvent() const { return event_; } |
4226 V8_INLINE Handle<Value> GetValue() const { return value_; } | 4229 V8_INLINE Handle<Value> GetValue() const { return value_; } |
| 4230 |
| 4231 // DEPRECATED. Use v8::Exception::GetMessage(GetValue())->GetStackTrace() |
4227 V8_INLINE Handle<StackTrace> GetStackTrace() const { return stack_trace_; } | 4232 V8_INLINE Handle<StackTrace> GetStackTrace() const { return stack_trace_; } |
4228 | 4233 |
4229 private: | 4234 private: |
4230 Handle<Promise> promise_; | 4235 Handle<Promise> promise_; |
4231 PromiseRejectEvent event_; | 4236 PromiseRejectEvent event_; |
4232 Handle<Value> value_; | 4237 Handle<Value> value_; |
4233 Handle<StackTrace> stack_trace_; | 4238 Handle<StackTrace> stack_trace_; |
4234 }; | 4239 }; |
4235 | 4240 |
4236 typedef void (*PromiseRejectCallback)(PromiseRejectMessage message); | 4241 typedef void (*PromiseRejectCallback)(PromiseRejectMessage message); |
(...skipping 3114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7351 */ | 7356 */ |
7352 | 7357 |
7353 | 7358 |
7354 } // namespace v8 | 7359 } // namespace v8 |
7355 | 7360 |
7356 | 7361 |
7357 #undef TYPE_CHECK | 7362 #undef TYPE_CHECK |
7358 | 7363 |
7359 | 7364 |
7360 #endif // V8_H_ | 7365 #endif // V8_H_ |
OLD | NEW |