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

Side by Side Diff: runtime/include/dart_api.h

Issue 124753002: Code cleanup (mostly io lib and some http lib). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head. Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 INCLUDE_DART_API_H_ 7 #ifndef INCLUDE_DART_API_H_
8 #define INCLUDE_DART_API_H_ 8 #define INCLUDE_DART_API_H_
9 9
10 /** \mainpage Dart Embedding API Reference 10 /** \mainpage Dart Embedding API Reference
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 * 295 *
296 * \param exception An instance of a Dart object to be thrown. 296 * \param exception An instance of a Dart object to be thrown.
297 */ 297 */
298 DART_EXPORT Dart_Handle Dart_NewUnhandledExceptionError(Dart_Handle exception); 298 DART_EXPORT Dart_Handle Dart_NewUnhandledExceptionError(Dart_Handle exception);
299 299
300 /** 300 /**
301 * Propagates an error. 301 * Propagates an error.
302 * 302 *
303 * If the provided handle is an unhandled exception error, this 303 * If the provided handle is an unhandled exception error, this
304 * function will cause the unhandled exception to be rethrown. This 304 * function will cause the unhandled exception to be rethrown. This
305 * will proceeed in the standard way, walking up Dart frames until an 305 * will proceed in the standard way, walking up Dart frames until an
306 * appropriate 'catch' block is found, executing 'finally' blocks, 306 * appropriate 'catch' block is found, executing 'finally' blocks,
307 * etc. 307 * etc.
308 * 308 *
309 * If the error is not an unhandled exception error, we will unwind 309 * If the error is not an unhandled exception error, we will unwind
310 * the stack to the next C frame. Intervening Dart frames will be 310 * the stack to the next C frame. Intervening Dart frames will be
311 * discarded; specifically, 'finally' blocks will not execute. This 311 * discarded; specifically, 'finally' blocks will not execute. This
312 * is the standard way that compilation errors (and the like) are 312 * is the standard way that compilation errors (and the like) are
313 * handled by the Dart runtime. 313 * handled by the Dart runtime.
314 * 314 *
315 * In either case, when an error is propagated any current scopes 315 * In either case, when an error is propagated any current scopes
316 * created by Dart_EnterScope will be exited. 316 * created by Dart_EnterScope will be exited.
317 * 317 *
318 * See the additonal discussion under "Propagating Errors" at the 318 * See the additional discussion under "Propagating Errors" at the
319 * beginning of this file. 319 * beginning of this file.
320 * 320 *
321 * \param An error handle (See Dart_IsError) 321 * \param An error handle (See Dart_IsError)
322 * 322 *
323 * \return On success, this function does not return. On failure, an 323 * \return On success, this function does not return. On failure, an
324 * error handle is returned. 324 * error handle is returned.
325 */ 325 */
326 DART_EXPORT Dart_Handle Dart_PropagateError(Dart_Handle handle); 326 DART_EXPORT Dart_Handle Dart_PropagateError(Dart_Handle handle);
327 /* TODO(turnidge): Should this really return an error handle? */ 327 /* TODO(turnidge): Should this really return an error handle? */
328 /* Consider just terminating. */ 328 /* Consider just terminating. */
(...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after
1941 */ 1941 */
1942 1942
1943 /* 1943 /*
1944 * TODO(turnidge): Remove these functions from the api and replace all 1944 * TODO(turnidge): Remove these functions from the api and replace all
1945 * uses with Dart_NewUnhandledExceptionError. */ 1945 * uses with Dart_NewUnhandledExceptionError. */
1946 1946
1947 /** 1947 /**
1948 * Throws an exception. 1948 * Throws an exception.
1949 * 1949 *
1950 * This function causes a Dart language exception to be thrown. This 1950 * This function causes a Dart language exception to be thrown. This
1951 * will proceeed in the standard way, walking up Dart frames until an 1951 * will proceed in the standard way, walking up Dart frames until an
1952 * appropriate 'catch' block is found, executing 'finally' blocks, 1952 * appropriate 'catch' block is found, executing 'finally' blocks,
1953 * etc. 1953 * etc.
1954 * 1954 *
1955 * If successful, this function does not return. Note that this means 1955 * If successful, this function does not return. Note that this means
1956 * that the destructors of any stack-allocated C++ objects will not be 1956 * that the destructors of any stack-allocated C++ objects will not be
1957 * called. If there are no Dart frames on the stack, an error occurs. 1957 * called. If there are no Dart frames on the stack, an error occurs.
1958 * 1958 *
1959 * \return An error handle if the exception was not thrown. 1959 * \return An error handle if the exception was not thrown.
1960 * Otherwise the function does not return. 1960 * Otherwise the function does not return.
1961 */ 1961 */
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
2387 * 2387 *
2388 * \param object An object. 2388 * \param object An object.
2389 * \param peer A value to store in the peer field. 2389 * \param peer A value to store in the peer field.
2390 * 2390 *
2391 * \return Returns an error if 'object' is a subtype of Null, num, or 2391 * \return Returns an error if 'object' is a subtype of Null, num, or
2392 * bool. 2392 * bool.
2393 */ 2393 */
2394 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); 2394 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer);
2395 2395
2396 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ 2396 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */
OLDNEW
« no previous file with comments | « pkg/http/lib/src/utils.dart ('k') | sdk/lib/io/common.dart » ('j') | sdk/lib/io/http_date.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698