(error)
| 3 | var _ = require("lodash"); |
| 4 | |
| 5 | function isException(error) { |
| 6 | let strError = error.toString(); |
| 7 | return strError.includes("invalid opcode") || strError.includes("invalid JUMP") || strError.includes("revert"); |
| 8 | } |
| 9 | |
| 10 | function ensureException(error) { |
| 11 | assert(isException(error), error.toString()); |