code: static Node getExceptionHandler(Node n) {
      for (Node cur = n;
          !cur.isScript() && !cur.isFunction();
          cur = cur.getParent()) {
        Node catchNode = getCatchHandlerForBlock(cur);
        if (catchNode != null) {
          return catchNode;
        }
      }
      return null;
    }
docs: Get the TRY block with a CATCH that would be run if n throws an exception.
  @return The CATCH node or null if it there isn't a CATCH before the
  the function terminates.