com.xlrit.gears.base.exception.SpecException Maven / Gradle / Ivy
package com.xlrit.gears.base.exception;
/**
* An exception thrown from the specifications through the `error` function.
*/
public class SpecException extends BaseException {
private final String baseMessage;
private final String location;
public SpecException(String baseMessage, String location) {
super(baseMessage + (location.isEmpty() ? "" : "\n\nLocation:\n" + location));
this.baseMessage = baseMessage;
this.location = location;
}
public String getBaseMessage() {
return baseMessage;
}
public String getLocation() {
return location;
}
}