switch (errorNode.nodeType) {
          case "RevertStatement":
            //I don't think this case should happen, but I'm including it
            //for extra certainty
            errorNode = errorNode.errorCall;