Document DEV_SIMPLE_EXCEPTION macro

This commit is contained in:
Kamil Śliwak 2021-10-12 12:51:44 +02:00
parent 19159b966a
commit 276d173e68

View File

@ -56,6 +56,10 @@ private:
::boost::throw_line(__LINE__) \
)
/// Defines an exception type that's meant to signal a specific condition and be caught rather than
/// unwind the stack all the way to the top-level exception handler and interrupt the program.
/// As such it does not carry a message - the code catching it is expected to handle it without
/// letting it escape.
#define DEV_SIMPLE_EXCEPTION(X) struct X: virtual ::solidity::util::Exception { const char* what() const noexcept override { return #X; } }
DEV_SIMPLE_EXCEPTION(InvalidAddress);