package org.hibernate.boot;
import org.hibernate.boot.jaxb.Origin;
public class MappingException extends org.hibernate.MappingException {
private final Origin origin;
public MappingException(String message, Origin origin) {
super( message );
this.origin = origin;
}
public MappingException(String message, Throwable root, Origin origin) {
super( message, root );
this.origin = origin;
}
@Override
public String getMessage() {
String message = super.getMessage();
if (origin != null) {
message += " : origin(" + origin.getName() + ")";
}
return message;
}
public Origin getOrigin() {
return origin;
}
}