Catch panic.

This commit is contained in:
chriseth
2020-12-22 11:08:44 +01:00
parent b78443ac75
commit b965446182
21 changed files with 619 additions and 80 deletions
+4 -1
View File
@@ -1494,6 +1494,8 @@ private:
* Syntax:
* try <call> returns (uint x, uint y) {
* // success code
* } catch Panic(uint errorCode) {
* // panic
* } catch Error(string memory cause) {
* // error code, reason provided
* } catch (bytes memory lowLevelData) {
@@ -1524,7 +1526,8 @@ public:
std::vector<ASTPointer<TryCatchClause>> const& clauses() const { return m_clauses; }
TryCatchClause const* successClause() const;
TryCatchClause const* structuredClause() const;
TryCatchClause const* panicClause() const;
TryCatchClause const* errorClause() const;
TryCatchClause const* fallbackClause() const;
private: