MCPcopy Create free account
hub / github.com/PolymathNetwork/polymath-core / isException

Function isException

test/helpers/utils.js:5–8  ·  view source on GitHub ↗
(error)

Source from the content-addressed store, hash-verified

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

Callers 1

ensureExceptionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected