List of usage examples for opennlp.tools.cmdline TerminateToolException TerminateToolException
public TerminateToolException(int code, String message)
From source file:es.ehu.si.ixa.pipe.nerc.train.InputOutputUtils.java
private static void checkInputFile(String name, File inFile) { String isFailure = null;// w w w . j ava 2s . c o m if (inFile.isDirectory()) { isFailure = "The " + name + " file is a directory!"; } else if (!inFile.exists()) { isFailure = "The " + name + " file does not exist!"; } else if (!inFile.canRead()) { isFailure = "No permissions to read the " + name + " file!"; } if (null != isFailure) { throw new TerminateToolException(-1, isFailure + " Path: " + inFile.getAbsolutePath()); } }