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

Unified Diff: runtime/include/dart_api.h

Issue 9169102: Add Dart_PropagateError. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Removed some unneeded includes Created 8 years, 11 months 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 | runtime/lib/isolate.cc » ('j') | runtime/lib/isolate.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
===================================================================
--- runtime/include/dart_api.h (revision 3416)
+++ runtime/include/dart_api.h (working copy)
@@ -140,6 +140,26 @@
*/
DART_EXPORT Dart_Handle Dart_Error(const char* format, ...);
+/**
+ * Propagates an error.
+ *
+ * It only makes sense to call this function when there are dart
+ * frames on the stack. That is, this function should only be called
+ * in the C implementation of a native function which has been called
+ * from Dart code. If this function is called in the top-level
+ * embedder code, it will return an error, as there is no way to
+ * further propagate the error.
+ *
+ * If the error handle represents an unhandled exception, this
siva 2012/01/31 00:52:34 if the handle or error handle?
turnidge 2012/01/31 21:56:31 Rewrote the comment a bit.
+ * function will cause the unhandled exception to be rethrown.
+ * Otherwise, this function will cause the stack to be an unwound,
+ * discarding any dart frames up to the next C frame.
+ *
+ * \return On success, this function does not return. On failure, an
+ * error handle is returned.
+ */
+DART_EXPORT Dart_Handle Dart_PropagateError(Dart_Handle handle);
+
// Internal routine used for reporting error handles.
DART_EXPORT void _Dart_ReportErrorHandle(const char* file,
int line,
« no previous file with comments | « no previous file | runtime/lib/isolate.cc » ('j') | runtime/lib/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698