Struct ctry_t
pub struct ctry_t { /* private fields */ }Expand description
C++ Try statement. This structure is also used to represent wind statements.
Implementations§
§impl ctry_t
impl ctry_t
pub unsafe fn is_wind(&self) -> bool
pub unsafe fn is_wind(&self) -> bool
Is C++ wind statement? (not part of the C++ language) MSVC generates code like the following to keep track of constructed objects and destroy them upon an exception. Example:
// an object is constructed at this point __wind { // some other code that may throw an exception } __unwind { // this code is executed only if there was an exception // in the __wind block. normally here we destroy the object // after that the exception is passed to the // exception handler, regular control flow is interrupted here. } // regular logic continues here, if there were no exceptions // also the object’s destructor is called
pub unsafe fn is_synchronized_block(&self) -> bool
pub unsafe fn is_synchronized_block(&self) -> bool
Is a synchronized block? Such a block matches this pattern: monitor_enter(obj); try { … } finally { monitor_exit(obj); }