// // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo // // The contents of this file are covered under the licence agreement in the // file "LICENCE" distributed with Cforall. // // exception.hfa -- User facing tools for working with exceptions. // // Author : Andrew Beach // Created On : Thu Apr 7 10:25:00 2020 // Last Modified By : Andrew Beach // Last Modified On : Wed May 25 17:20:00 2022 // Update Count : 5 // // Everything below this line should be considered a patch while the exception // objects themselves are designed and created and should be removed in time. // ----------------------------------------------------------------------------------------------- // EHM_DEFAULT_VTABLE(exception_type) // Create a declaration for a (possibly polymorphic) default vtable. // Mostly used by and for the currency module. #define EHM_DEFAULT_VTABLE(type) vtable(type) & const _default_vtable // IS_EXCEPTION(exception_type) // IS_RESUMPTION_EXCEPTION(exception_type) // IS_TERMINATION_EXCEPTION(exception_type) // Create an assertion that exception_type is the given kind of exception. // This is used to mimic associated types so the vtable type is unmentioned. #define IS_EXCEPTION(type) is_exception(type, vtable(type)) #define IS_RESUMPTION_EXCEPTION(type) is_resumption_exception(type, vtable(type)) #define IS_TERMINATION_EXCEPTION(type) is_termination_exception(type, vtable(type))