
exception.AbstractCustomException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of flexible-tree Show documentation
Show all versions of flexible-tree Show documentation
Library for generating permutation of given value domains
The newest version!
package exception;
/**
* This class simplifies implementation of custom exceptions
*/
public abstract class AbstractCustomException extends Exception {
private final String message;
public AbstractCustomException(Exception exception) {
assert exception != null;
this.message = exception.getMessage();
if (exception.getStackTrace().length == 0){
this.setStackTrace(Thread.currentThread().getStackTrace());
}
else {
this.setStackTrace(exception.getStackTrace());
}
}
public AbstractCustomException(String message) {
assert message != null;
this.message = message;
this.setStackTrace(Thread.currentThread().getStackTrace());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy