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

Side by Side Diff: include/v8.h

Issue 342078: Added TryCatch::ReThrow method. (Closed)
Patch Set: Created 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2009 the V8 project authors. All rights reserved. 1 // Copyright 2007-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2455 matching lines...) Expand 10 before | Expand all | Expand 10 after
2466 * is termination exception. Such exceptions are thrown when the 2466 * is termination exception. Such exceptions are thrown when the
2467 * TerminateExecution methods are called to terminate a long-running 2467 * TerminateExecution methods are called to terminate a long-running
2468 * script. 2468 * script.
2469 * 2469 *
2470 * If CanContinue returns false, the correct action is to perform 2470 * If CanContinue returns false, the correct action is to perform
2471 * any C++ cleanup needed and then return. 2471 * any C++ cleanup needed and then return.
2472 */ 2472 */
2473 bool CanContinue() const; 2473 bool CanContinue() const;
2474 2474
2475 /** 2475 /**
2476 * Throws the exception caught by this TryCatch in a way that avoids
2477 * it being caught again by this same TryCatch. As with ThrowException
2478 * it is illegal to execute any JavaScript operations after calling
2479 * ReThrow; the caller must return immediately to where the exception
2480 * is caught.
2481 */
2482 Handle<Value> ReThrow();
2483
2484 /**
2476 * Returns the exception caught by this try/catch block. If no exception has 2485 * Returns the exception caught by this try/catch block. If no exception has
2477 * been caught an empty handle is returned. 2486 * been caught an empty handle is returned.
2478 * 2487 *
2479 * The returned handle is valid until this TryCatch block has been destroyed. 2488 * The returned handle is valid until this TryCatch block has been destroyed.
2480 */ 2489 */
2481 Local<Value> Exception() const; 2490 Local<Value> Exception() const;
2482 2491
2483 /** 2492 /**
2484 * Returns the .stack property of the thrown object. If no .stack 2493 * Returns the .stack property of the thrown object. If no .stack
2485 * property is present an empty handle is returned. 2494 * property is present an empty handle is returned.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
2520 * Set whether or not this TryCatch should capture a Message object 2529 * Set whether or not this TryCatch should capture a Message object
2521 * which holds source information about where the exception 2530 * which holds source information about where the exception
2522 * occurred. True by default. 2531 * occurred. True by default.
2523 */ 2532 */
2524 void SetCaptureMessage(bool value); 2533 void SetCaptureMessage(bool value);
2525 2534
2526 public: 2535 public:
2527 TryCatch* next_; 2536 TryCatch* next_;
2528 void* exception_; 2537 void* exception_;
2529 void* message_; 2538 void* message_;
2530 bool is_verbose_; 2539 bool is_verbose_ : 1;
2531 bool can_continue_; 2540 bool can_continue_ : 1;
2532 bool capture_message_; 2541 bool capture_message_ : 1;
2542 bool rethrow_ : 1;
2533 void* js_handler_; 2543 void* js_handler_;
2534 }; 2544 };
2535 2545
2536 2546
2537 // --- C o n t e x t --- 2547 // --- C o n t e x t ---
2538 2548
2539 2549
2540 /** 2550 /**
2541 * Ignore 2551 * Ignore
2542 */ 2552 */
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
3194 3204
3195 } // namespace v8 3205 } // namespace v8
3196 3206
3197 3207
3198 #undef V8EXPORT 3208 #undef V8EXPORT
3199 #undef V8EXPORT_INLINE 3209 #undef V8EXPORT_INLINE
3200 #undef TYPE_CHECK 3210 #undef TYPE_CHECK
3201 3211
3202 3212
3203 #endif // V8_H_ 3213 #endif // V8_H_
OLDNEW
« 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