org.liblouis.CompilationException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of liblouis-java Show documentation
Show all versions of liblouis-java Show documentation
JNA based Java bindings to liblouis, an open-source braille translator and back-translator.
The newest version!
package org.liblouis;
import java.util.List;
@SuppressWarnings("serial")
public class CompilationException extends Exception {
public CompilationException(String message) {
super(message);
}
public CompilationException(String message, List errors) {
this(addErrorsToMessage(message, errors));
}
public CompilationException(Throwable cause) {
super(cause);
}
public CompilationException(String message, Throwable cause) {
super(message, cause);
}
private static String addErrorsToMessage(String message, List errors) {
if (errors != null && !errors.isEmpty()) {
message += "\nErrors:";
for (String e : errors)
message += ("\n" + e);
}
return message;
}
}