mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Document DEV_SIMPLE_EXCEPTION macro
This commit is contained in:
parent
19159b966a
commit
276d173e68
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user