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); | 4167 static Local<StackTrace> GetStackTrace(Handle<Value> exception); |
4168 | |
4169 V8_DEPRECATED( | |
4170 "Use GetMessage()->GetStackTrace()", | |
4171 static Local<StackTrace> GetStackTrace(Handle<Value> exception)); | |
4172 }; | 4168 }; |
4173 | 4169 |
4174 | 4170 |
4175 // --- Counters Callbacks --- | 4171 // --- Counters Callbacks --- |
4176 | 4172 |
4177 typedef int* (*CounterLookupCallback)(const char* name); | 4173 typedef int* (*CounterLookupCallback)(const char* name); |
4178 | 4174 |
4179 typedef void* (*CreateHistogramCallback)(const char* name, | 4175 typedef void* (*CreateHistogramCallback)(const char* name, |
4180 int min, | 4176 int min, |
4181 int max, | 4177 int max, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4221 PromiseRejectMessage(Handle<Promise> promise, PromiseRejectEvent event, | 4217 PromiseRejectMessage(Handle<Promise> promise, PromiseRejectEvent event, |
4222 Handle<Value> value, Handle<StackTrace> stack_trace) | 4218 Handle<Value> value, Handle<StackTrace> stack_trace) |
4223 : promise_(promise), | 4219 : promise_(promise), |
4224 event_(event), | 4220 event_(event), |
4225 value_(value), | 4221 value_(value), |
4226 stack_trace_(stack_trace) {} | 4222 stack_trace_(stack_trace) {} |
4227 | 4223 |
4228 V8_INLINE Handle<Promise> GetPromise() const { return promise_; } | 4224 V8_INLINE Handle<Promise> GetPromise() const { return promise_; } |
4229 V8_INLINE PromiseRejectEvent GetEvent() const { return event_; } | 4225 V8_INLINE PromiseRejectEvent GetEvent() const { return event_; } |
4230 V8_INLINE Handle<Value> GetValue() const { return value_; } | 4226 V8_INLINE Handle<Value> GetValue() const { return value_; } |
4231 | 4227 V8_INLINE Handle<StackTrace> GetStackTrace() const { return stack_trace_; } |
4232 V8_DEPRECATED("Use v8::Exception::GetMessage(GetValue())->GetStackTrace()", | |
4233 V8_INLINE Handle<StackTrace> GetStackTrace() const) { | |
4234 return stack_trace_; | |
4235 } | |
4236 | 4228 |
4237 private: | 4229 private: |
4238 Handle<Promise> promise_; | 4230 Handle<Promise> promise_; |
4239 PromiseRejectEvent event_; | 4231 PromiseRejectEvent event_; |
4240 Handle<Value> value_; | 4232 Handle<Value> value_; |
4241 Handle<StackTrace> stack_trace_; | 4233 Handle<StackTrace> stack_trace_; |
4242 }; | 4234 }; |
4243 | 4235 |
4244 typedef void (*PromiseRejectCallback)(PromiseRejectMessage message); | 4236 typedef void (*PromiseRejectCallback)(PromiseRejectMessage message); |
4245 | 4237 |
(...skipping 3113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7359 */ | 7351 */ |
7360 | 7352 |
7361 | 7353 |
7362 } // namespace v8 | 7354 } // namespace v8 |
7363 | 7355 |
7364 | 7356 |
7365 #undef TYPE_CHECK | 7357 #undef TYPE_CHECK |
7366 | 7358 |
7367 | 7359 |
7368 #endif // V8_H_ | 7360 #endif // V8_H_ |
OLD | NEW |