package org.opencds.cqf.cql.engine.exception;

import org.opencds.cqf.cql.engine.debug.SourceLocator;

public class CqlException extends RuntimeException
{
    private static final long serialVersionUID = 1L;

    public CqlException(String message)
    {
        super(message);
    }
    public CqlException(String message, Throwable cause) {
        super(message, cause);
    }
    public CqlException(Throwable cause) {
        super(cause == null ? null : String.format("Unexpected exception caught during execution: %s", cause.toString(), cause));
        if (cause != null) {
            this.cause = cause;
        }
    }

    public CqlException(String message, SourceLocator sourceLocator) {
        super(message);
        this.sourceLocator = sourceLocator;
    }

    public CqlException(String message, Throwable cause, SourceLocator sourceLocator) {
        super(message, cause);
        this.cause = cause;
        this.sourceLocator = sourceLocator;
    }

    public CqlException(Throwable cause, SourceLocator sourceLocator) {
        this(cause);
        this.sourceLocator = sourceLocator;
    }

    public CqlException(String message, SourceLocator sourceLocator, Severity severity) {
        this(message, sourceLocator);
        this.severity = severity;
    }

    public CqlException(String message, Throwable cause, SourceLocator sourceLocator, Severity severity) {
        this(message, cause, sourceLocator);
        this.severity = severity;
    }

    private Severity severity = Severity.ERROR;
    public Severity getSeverity() {
        return severity;
    }

    private Throwable cause;
    public Throwable getCause() { return cause;}

    private SourceLocator sourceLocator;
    public SourceLocator getSourceLocator() {
        return sourceLocator;
    }

    public void setSourceLocator(SourceLocator sourceLocator) {
        this.sourceLocator = sourceLocator;
    }
}

@@ -537,24 +537,25 @@
 String()
+)
 , cause)
 );%0A     
@@ -550,81 +550,9 @@
 use)
-);%0A        if (cause != null) %7B%0A            this.cause = cause;%0A        %7D
+;
 %0A   
@@ -824,36 +824,8 @@
 e);%0A
-        this.cause = cause;%0A
     
@@ -1497,87 +1497,8 @@
  %7D%0A%0A
-    private Throwable cause;%0A    public Throwable getCause() %7B return cause;%7D%0A%0A
     

Move the comma