public static MessageFormatException createMessageFormatException(Exception cause) { String msg = cause.getMessage(); if (msg == null || msg.length() == 0) { msg = cause.toString(); } MessageFormatException exception = new MessageFormatException(msg); exception.setLinkedException(cause); exception.initCause(cause); return exception; } }
protected static JMSException convertExceptionToJMSException(Exception e) { JMSException ex = new JMSException(e.getMessage()); ex.initCause(e); return ex; }
public static MessageFormatException createMessageFormatException(Throwable cause) { String msg = cause.getMessage(); if (msg == null || msg.length() == 0) { msg = cause.toString(); } MessageFormatException exception = new MessageFormatException(msg); exception.initCause(cause); return exception; }
public static MessageFormatException createMessageFormatException(Throwable cause) { String msg = cause.getMessage(); if (msg == null || msg.length() == 0) { msg = cause.toString(); } MessageFormatException exception = new MessageFormatException(msg); exception.initCause(cause); return exception; }
protected static MessageFormatException convertExceptionToMessageFormatException(Exception e) { MessageFormatException ex = new MessageFormatException(e.getMessage()); ex.initCause(e); return ex; }
public static MessageFormatException createMessageFormatException(Exception cause) { String msg = cause.getMessage(); if (msg == null || msg.length() == 0) { msg = cause.toString(); } MessageFormatException exception = new MessageFormatException(msg); exception.setLinkedException(cause); exception.initCause(cause); return exception; } }
public static MessageFormatException createMessageFormatException(Exception cause) { String msg = cause.getMessage(); if (msg == null || msg.length() == 0) { msg = cause.toString(); } MessageFormatException exception = new MessageFormatException(msg); exception.setLinkedException(cause); exception.initCause(cause); return exception; } }
public static MessageFormatException createMessageFormatException(Exception cause) { String msg = cause.getMessage(); if (msg == null || msg.length() == 0) { msg = cause.toString(); } MessageFormatException exception = new MessageFormatException(msg); exception.setLinkedException(cause); exception.initCause(cause); return exception; }
public static MessageFormatException createMessageFormatException(Exception cause) { String msg = cause.getMessage(); if (msg == null || msg.length() == 0) { msg = cause.toString(); } MessageFormatException exception = new MessageFormatException(msg); exception.setLinkedException(cause); exception.initCause(cause); return exception; } }
public static MessageFormatException createMessageFormatException(Exception cause) { String msg = cause.getMessage(); if (msg == null || msg.length() == 0) { msg = cause.toString(); } MessageFormatException exception = new MessageFormatException(msg); exception.setLinkedException(cause); exception.initCause(cause); return exception; } }
/** * Creates or passes through a MessageFormatException to be thrown to the client. * * In the event that the exception passed to this method is already a * MessageFormatException it is passed through unmodified, otherwise a new * MessageFormatException is created using the error message taken from the * given Throwable value and the cause value is set to the given Throwable * instance. * * @param cause * The exception that caused this error state. * * @return a MessageEOFException instance. */ public static MessageFormatException createMessageFormatException(Throwable cause) { String message = cause.getMessage(); if (message == null || message.length() == 0) { message = cause.toString(); } MessageFormatException exception = new MessageFormatException(message); if (cause instanceof Exception) { exception.setLinkedException((Exception) cause); } exception.initCause(cause); return exception; }
/** * Creates or passes through a MessageFormatException to be thrown to the client. * * In the event that the exception passed to this method is already a * MessageFormatException it is passed through unmodified, otherwise a new * MessageFormatException is created using the error message taken from the * given Throwable value and the cause value is set to the given Throwable * instance. * * @param cause * The exception that caused this error state. * * @return a MessageEOFException instance. */ public static MessageFormatException createMessageFormatException(Throwable cause) { String message = cause.getMessage(); if (message == null || message.length() == 0) { message = cause.toString(); } MessageFormatException exception = new MessageFormatException(message); if (cause instanceof Exception) { exception.setLinkedException((Exception) cause); } exception.initCause(cause); return exception; }
private void checkBodyReadable() throws JMSException { if (!this.readonly) { throw new MessageNotReadableException("The message " + getJMSMessageID() + " is not in readable state"); } if (this.initializeBodyException != null) { final MessageFormatException e1 = new MessageFormatException( "Problem reading body for " + getJMSMessageID()); e1.initCause(this.initializeBodyException); throw e1; } }