Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: include/v8.h

Issue 711353002: Rename v8::Exception::GetMessage to CreateMessage. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: added comments Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index ddae1ed229314b7623bc110be862f140aed8ed06..e59a8ea79ca15cc088988a025394734b9f71d867 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -4188,9 +4188,17 @@ class V8_EXPORT Exception {
static Local<Value> TypeError(Handle<String> message);
static Local<Value> Error(Handle<String> message);
- static Local<Message> GetMessage(Handle<Value> exception);
+ /**
+ * Creates an error message for the given exception.
+ * Will try to reconstruct the original stack trace from the exception value,
+ * or capture the current stack trace if not available.
+ */
+ static Local<Message> CreateMessage(Handle<Value> exception);
- // DEPRECATED. Use GetMessage()->GetStackTrace()
+ /**
+ * Returns the original stack trace that was captured at the creation time
+ * of a given exception, or an empty handle if not available.
+ */
static Local<StackTrace> GetStackTrace(Handle<Value> exception);
};
@@ -4252,7 +4260,7 @@ class PromiseRejectMessage {
V8_INLINE PromiseRejectEvent GetEvent() const { return event_; }
V8_INLINE Handle<Value> GetValue() const { return value_; }
- // DEPRECATED. Use v8::Exception::GetMessage(GetValue())->GetStackTrace()
+ // DEPRECATED. Use v8::Exception::CreateMessage(GetValue())->GetStackTrace()
V8_INLINE Handle<StackTrace> GetStackTrace() const { return stack_trace_; }
private:
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698