org.unlaxer.sample.calc.Errors Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of calculator Show documentation
Show all versions of calculator Show documentation
a simple parser combinator inspired by RelaxNG
package org.unlaxer.sample.calc;
import java.util.Optional;
public class Errors{
public final Optional raisedException;
public final Optional message;
public Errors() {
super();
raisedException = Optional.empty();
message=Optional.empty();
}
public Errors(Optional raisedException, Optional message) {
super();
this.raisedException = raisedException;
this.message = message;
}
public Errors(Exception exception) {
raisedException = Optional.of(exception);
message = Optional.ofNullable(exception.getMessage());
}
}