/** * @return an IOException version of this exception */ public IOJournalClosedException toIOException() { return new IOJournalClosedException(getMessage()); }
/** * @return a regular (non-IOException) version of this exception */ public JournalClosedException toJournalClosedException() { return new JournalClosedException(getMessage()); } }
/** * Constructs a new exception with the specified exception message, the cause and multiple * parameters. * * @param message the exception message * @param cause the cause * @param params the parameters */ public InvalidWorkerStateException(ExceptionMessage message, Throwable cause, Object... params) { this(message.getMessage(params), cause); } }
private void checkJournalWriterOpen() throws IOJournalClosedException { if (mClosed) { throw new JournalClosedException("Journal writer is closed").toIOException(); } } }
/** * Constructs a new exception with the specified exception message, the cause and multiple * parameters. * * @param message the exception message * @param cause the cause * @param params the parameters */ public BlockInfoException(ExceptionMessage message, Throwable cause, Object... params) { this(message.getMessage(params), cause); } }
/** * Constructs a new exception with the specified exception message, the cause and multiple * parameters. * * @param message the exception message * @param cause the cause * @param params the parameters */ public ConnectionFailedException(ExceptionMessage message, Throwable cause, Object... params) { this(message.getMessage(params), cause); } }
/** * Constructs a new exception with the specified exception message, the cause and multiple * parameters. * * @param message the exception message * @param cause the cause * @param params the parameters */ public BlockAlreadyExistsException(ExceptionMessage message, Throwable cause, Object... params) { this(message.getMessage(params), cause); } }
/** * Constructs a new exception with the specified exception message and multiple parameters. * * @param message the exception message * @param params the parameters */ public FileAlreadyExistsException(ExceptionMessage message, Object... params) { this(message.getMessage(params)); }
/** * Constructs a new exception with the specified exception message and multiple parameters. * * @param message the exception message * @param params the parameters */ public InvalidJournalEntryException(ExceptionMessage message, Object... params) { this(message.getMessage(params)); }
/** * Constructs a new exception with the specified exception message, the cause and multiple * parameters. * * @param message the exception message * @param cause the cause * @param params the parameters */ public InvalidJournalEntryException(ExceptionMessage message, Throwable cause, Object... params) { this(message.getMessage(params), cause); } }
/** * Constructs a new exception with the specified exception message and multiple parameters. * * @param message the exception message * @param params the parameters */ public InvalidPathException(ExceptionMessage message, Object... params) { this(message.getMessage(params)); }
/** * Constructs a new exception with the specified exception message, the cause and multiple * parameters. * * @param message the exception message * @param cause the cause * @param params the parameters */ public JobDoesNotExistException(ExceptionMessage message, Throwable cause, Object... params) { this(message.getMessage(params), cause); }
/** * Constructs a new exception saying the specified job ID does not exist. * * @param jobId the job id which does not exit */ public JobDoesNotExistException(long jobId) { this(ExceptionMessage.JOB_DOES_NOT_EXIST.getMessage(jobId)); } }
/** * Formats the message of the exception with a url to consult. * * @param url the url to consult * @param params the parameters for the exception message * @return the formatted message */ public String getMessageWithUrl(String url, Object... params) { return getMessage(params) + " Please consult " + url + " for common solutions to address this problem."; } }
/** * Constructs a new exception with the specified exception message, the cause and multiple * parameters. * * @param message the exception message * @param cause the cause * @param params the parameters */ public BlockDoesNotExistException(ExceptionMessage message, Throwable cause, Object... params) { this(message.getMessage(params), cause); } }
/** * Constructs a new exception with the specified exception message, the cause and multiple * parameters. * * @param message the exception message * @param cause the cause * @param params the parameters */ public FileAlreadyExistsException(ExceptionMessage message, Throwable cause, Object... params) { this(message.getMessage(params), cause); }
/** * Constructs a new exception with the specified exception message and multiple parameters. * * @param message the exception message * @param params the parameters */ public ConnectionFailedException(ExceptionMessage message, Object... params) { this(message.getMessage(params)); }
/** * Constructs a new exception with the specified exception message, the cause and multiple * parameters. * * @param message the exception message * @param cause the cause * @param params the parameters */ public FailedToCheckpointException(ExceptionMessage message, Throwable cause, Object... params) { this(message.getMessage(params), cause); } }
/** * Constructs a new exception with the specified exception message and multiple parameters. * * @param message the exception message * @param params the parameters */ public BlockAlreadyExistsException(ExceptionMessage message, Object... params) { this(message.getMessage(params)); }
/** * Constructs a new exception with the specified exception message and multiple parameters. * * @param message the exception message * @param params the parameters */ public BlockDoesNotExistException(ExceptionMessage message, Object... params) { this(message.getMessage(params)); }