Chromium Code Reviews| 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, |