OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
3 * for details. All rights reserved. Use of this source code is governed by a | 3 * for details. All rights reserved. Use of this source code is governed by a |
4 * BSD-style license that can be found in the LICENSE file. | 4 * BSD-style license that can be found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #ifndef RUNTIME_INCLUDE_DART_API_H_ | 7 #ifndef RUNTIME_INCLUDE_DART_API_H_ |
8 #define RUNTIME_INCLUDE_DART_API_H_ | 8 #define RUNTIME_INCLUDE_DART_API_H_ |
9 | 9 |
10 /** \mainpage Dart Embedding API Reference | 10 /** \mainpage Dart Embedding API Reference |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 * invalid arguments or in an invalid context. | 118 * invalid arguments or in an invalid context. |
119 * | 119 * |
120 * - Unhandled exception error handles are produced when, during the | 120 * - Unhandled exception error handles are produced when, during the |
121 * execution of Dart code, an exception is thrown but not caught. | 121 * execution of Dart code, an exception is thrown but not caught. |
122 * Prototypically this would occur during a call to Dart_Invoke, but | 122 * Prototypically this would occur during a call to Dart_Invoke, but |
123 * it can occur in any function which triggers the execution of Dart | 123 * it can occur in any function which triggers the execution of Dart |
124 * code (for example, Dart_ToString). | 124 * code (for example, Dart_ToString). |
125 * | 125 * |
126 * An unhandled exception error provides access to an exception and | 126 * An unhandled exception error provides access to an exception and |
127 * stacktrace via the functions Dart_ErrorGetException and | 127 * stacktrace via the functions Dart_ErrorGetException and |
128 * Dart_ErrorGetStacktrace. | 128 * Dart_ErrorGetStackTrace. |
129 * | 129 * |
130 * - Compilation error handles are produced when, during the execution | 130 * - Compilation error handles are produced when, during the execution |
131 * of Dart code, a compile-time error occurs. As above, this can | 131 * of Dart code, a compile-time error occurs. As above, this can |
132 * occur in any function which triggers the execution of Dart code. | 132 * occur in any function which triggers the execution of Dart code. |
133 * | 133 * |
134 * - Fatal error handles are produced when the system wants to shut | 134 * - Fatal error handles are produced when the system wants to shut |
135 * down the current isolate. Sometimes a fatal error may be a | 135 * down the current isolate. Sometimes a fatal error may be a |
136 * restart request (see Dart_IsRestartRequest). If the embedder does | 136 * restart request (see Dart_IsRestartRequest). If the embedder does |
137 * not support restarting the VM, then this should be treated as a | 137 * not support restarting the VM, then this should be treated as a |
138 * normal fatal error. | 138 * normal fatal error. |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 DART_EXPORT bool Dart_IsApiError(Dart_Handle handle); | 277 DART_EXPORT bool Dart_IsApiError(Dart_Handle handle); |
278 | 278 |
279 /** | 279 /** |
280 * Is this an unhandled exception error handle? | 280 * Is this an unhandled exception error handle? |
281 * | 281 * |
282 * Unhandled exception error handles are produced when, during the | 282 * Unhandled exception error handles are produced when, during the |
283 * execution of Dart code, an exception is thrown but not caught. | 283 * execution of Dart code, an exception is thrown but not caught. |
284 * This can occur in any function which triggers the execution of Dart | 284 * This can occur in any function which triggers the execution of Dart |
285 * code. | 285 * code. |
286 * | 286 * |
287 * See Dart_ErrorGetException and Dart_ErrorGetStacktrace. | 287 * See Dart_ErrorGetException and Dart_ErrorGetStackTrace. |
288 * | 288 * |
289 * Requires there to be a current isolate. | 289 * Requires there to be a current isolate. |
290 */ | 290 */ |
291 DART_EXPORT bool Dart_IsUnhandledExceptionError(Dart_Handle handle); | 291 DART_EXPORT bool Dart_IsUnhandledExceptionError(Dart_Handle handle); |
292 | 292 |
293 /** | 293 /** |
294 * Is this a compilation error handle? | 294 * Is this a compilation error handle? |
295 * | 295 * |
296 * Compilation error handles are produced when, during the execution | 296 * Compilation error handles are produced when, during the execution |
297 * of Dart code, a compile-time error occurs. This can occur in any | 297 * of Dart code, a compile-time error occurs. This can occur in any |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 DART_EXPORT bool Dart_ErrorHasException(Dart_Handle handle); | 340 DART_EXPORT bool Dart_ErrorHasException(Dart_Handle handle); |
341 | 341 |
342 /** | 342 /** |
343 * Gets the exception Object from an unhandled exception error handle. | 343 * Gets the exception Object from an unhandled exception error handle. |
344 */ | 344 */ |
345 DART_EXPORT Dart_Handle Dart_ErrorGetException(Dart_Handle handle); | 345 DART_EXPORT Dart_Handle Dart_ErrorGetException(Dart_Handle handle); |
346 | 346 |
347 /** | 347 /** |
348 * Gets the stack trace Object from an unhandled exception error handle. | 348 * Gets the stack trace Object from an unhandled exception error handle. |
349 */ | 349 */ |
350 DART_EXPORT Dart_Handle Dart_ErrorGetStacktrace(Dart_Handle handle); | 350 DART_EXPORT Dart_Handle Dart_ErrorGetStackTrace(Dart_Handle handle); |
351 | 351 |
352 /** | 352 /** |
353 * Produces an api error handle with the provided error message. | 353 * Produces an api error handle with the provided error message. |
354 * | 354 * |
355 * Requires there to be a current isolate. | 355 * Requires there to be a current isolate. |
356 * | 356 * |
357 * \param error the error message. | 357 * \param error the error message. |
358 */ | 358 */ |
359 DART_EXPORT Dart_Handle Dart_NewApiError(const char* error); | 359 DART_EXPORT Dart_Handle Dart_NewApiError(const char* error); |
360 | 360 |
(...skipping 2941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3302 */ | 3302 */ |
3303 DART_EXPORT bool Dart_IsPrecompiledRuntime(); | 3303 DART_EXPORT bool Dart_IsPrecompiledRuntime(); |
3304 | 3304 |
3305 | 3305 |
3306 /** | 3306 /** |
3307 * Print a native stack trace. Used for crash handling. | 3307 * Print a native stack trace. Used for crash handling. |
3308 */ | 3308 */ |
3309 DART_EXPORT void Dart_DumpNativeStackTrace(void* context); | 3309 DART_EXPORT void Dart_DumpNativeStackTrace(void* context); |
3310 | 3310 |
3311 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 3311 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |