package com.jclark.xsl.om;

public class XSLException extends Exception {
  private Node node;
  private Exception exception;
  public XSLException() {
    this.node = null;
  }
  public XSLException(String detail, Node node) {
    super(detail);
    this.node = node;
  }
  public XSLException(String detail) {
    super(detail);
    this.node = null;
  }
  public XSLException(Exception exception) {
    this.exception = exception;
  }
  public XSLException(Exception exception, Node node) {
    this.exception = exception;
    this.node = node;
  }
  void setNode(Node node) {
    this.node = node;
  }
  public Node getNode() {
    return node;
  }
  public Exception getException() {
    return exception == null ? this : exception;
  }
}
