Panic codes.

This commit is contained in:
chriseth
2020-10-22 19:25:55 +02:00
parent b559de11ee
commit bfd267459c
14 changed files with 156 additions and 79 deletions
+4 -3
View File
@@ -28,6 +28,8 @@
#include <libsolidity/interface/DebugSettings.h>
#include <libsolutil/ErrorCodes.h>
#include <memory>
#include <string>
#include <vector>
@@ -406,9 +408,8 @@ public:
std::string revertReasonIfDebug(std::string const& _message = "");
/// Executes the invalid opcode.
/// Might use revert with special error code in the future.
std::string panicFunction();
/// Reverts with ``Panic(uint256)`` and the given code.
std::string panicFunction(util::PanicCode _code);
/// Returns the name of a function that decodes an error message.
/// signature: () -> arrayPtr