Changeset 239d25b in mainline for uspace/lib/cpp/include/__bits/trycatch.hpp
- Timestamp:
- 2019-07-02T10:58:42Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4d68584
- Parents:
- fda6dd4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/__bits/trycatch.hpp
rfda6dd4 r239d25b 67 67 68 68 /** 69 * The language allows us to odr-use a variable 70 * that is not defined. We use this to support 71 * macros redefining the catch keyword that are 72 * followed by a block that uses that symbol. 73 * 74 * Normally, that would produce a compiler error 75 * as the declaration of that variale would be removed 76 * with the catch statement, but if we use the following 77 * declaration's name as the name of the caught exception, 78 * all will work well because of this extern declaration. 79 * 80 * Note: We do not follow our usual convention of using 81 * the aux:: namespace because that cannot be used in 82 * variable declaration. 83 */ 84 extern int __exception; 85 86 /** 69 87 * These macros allow us to choose how the program 70 88 * should behave when an exception is thrown … … 87 105 #define LIBCPP_EXCEPTION_IGNORE /* IGNORE */ 88 106 #define LIBCPP_EXCEPTION_HANDLE_THROW LIBCPP_EXCEPTION_IGNORE 89 #define LIBCPP_EXCEPTION_HANDLE_CATCH LIBCPP_EXCEPTION_ HANG107 #define LIBCPP_EXCEPTION_HANDLE_CATCH LIBCPP_EXCEPTION_ABORT 90 108 91 109 #define try if constexpr (::std::aux::try_blocks_allowed)
Note:
See TracChangeset
for help on using the changeset viewer.