public IllegalStateException error(final String format, final Object... args) { final String message = String.format(format, args); if (error == DocoptLanguageError.class) { throw new DocoptLanguageError(message); } if (error == DocoptExitException.class) { throw new DocoptExitException(1, message, true); } return new IllegalStateException("Unexpected exception: " + error.getClass().getName()); } }
public IllegalStateException error(final String format, final Object... args) { final String message = String.format(format, args); if (error == DocoptLanguageError.class) { throw new DocoptLanguageError(message); } if (error == DocoptExitException.class) { throw new DocoptExitException(1, message, true); } return new IllegalStateException("Unexpected exception: " + error.getClass().getName()); } }
throw new DocoptExitException(0, doc.replaceAll("^\\n+|\\n+$", ""), false); throw new DocoptExitException(0, version, false);
throw new DocoptExitException(0, doc.replaceAll("^\\n+|\\n+$", ""), false); throw new DocoptExitException(0, version, false);
throw new DocoptExitException(1, null, true);
throw new DocoptExitException(1, null, true);