try {
// ...
} catch (InputFormatException e) {
// ...
} catch (FileNotFoundException e) {
// ...
} catch (IOException e) {
// ...
}
PaperInputResult result = PaperInput.process(input);
if (result.isSuccess()) {
// ...
} else {
int errorCode = result.getErrorCode();
String errorMessage = result.getErrorMessage();
// ...
}
public static void processPaperInput(String input) throws InputFormatException, IOException {
// ...
}