All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opencds.cqf.cql.exception.CqlExceptionHandler Maven / Gradle / Ivy

package org.opencds.cqf.cql.exception;

import org.apache.commons.lang3.exception.ExceptionUtils;

public class CqlExceptionHandler implements Thread.UncaughtExceptionHandler
{
    @Override
    public void uncaughtException(Thread t, Throwable e) {
        Throwable rootCause = ExceptionUtils.getRootCause(e);
        rootCause.printStackTrace(System.err);
        throw new CqlException("Unexpected exception caught during execution: " + e.getClass().getName() + "\nWith trace:\n" + ExceptionUtils.getStackTrace(e));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy