com.simba.dsi.exceptions
Class InputOutputException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by com.simba.dsi.exceptions.InputOutputException
All Implemented Interfaces:
java.io.Serializable

public class InputOutputException
extends java.io.IOException

Exception class for IO errors.

See Also:
Serialized Form

Constructor Summary
InputOutputException(int componentId, java.lang.String msgKey)
          Constructor.
InputOutputException(int componentId, java.lang.String msgKey, java.lang.String[] msgParams)
          Constructor.
InputOutputException(java.lang.String message, int nativeErrorCode)
          Constructor.
 
Method Summary
 int getErrorCode()
          Return the vendor error code.
 java.lang.String getLocalizedMessage()
          Overrides Exception's getLocalizedMessage() implementation.
 java.lang.String getMessage()
          Overrides Exception's getMessage() implementation.
 void loadMessage(com.simba.support.IMessageSource messageSource, java.util.Locale locale)
          Loads the error message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InputOutputException

public InputOutputException(int componentId,
                            java.lang.String msgKey)
Constructor.

Parameters:
componentId - The component ID.
msgKey - The message key.

InputOutputException

public InputOutputException(int componentId,
                            java.lang.String msgKey,
                            java.lang.String[] msgParams)
Constructor.

Parameters:
componentId - The component ID.
msgKey - The message key.
msgParams - The parameters (or tokens) used to construct the error message.

InputOutputException

public InputOutputException(java.lang.String message,
                            int nativeErrorCode)
Constructor.

A null message is saved as an empty string.

Parameters:
message - Preformatted error message.
nativeErrorCode - The native error code for this error.
Method Detail

getErrorCode

public int getErrorCode()
Return the vendor error code. loadMessage() must have been called if the message has not yet been loaded from a message source.

Returns:
The vendor error code.

getLocalizedMessage

public java.lang.String getLocalizedMessage()
Overrides Exception's getLocalizedMessage() implementation. loadMessage() must have been called if the message has not yet been loaded from a message source.

Overrides:
getLocalizedMessage in class java.lang.Throwable
Returns:
The localized error message.

getMessage

public java.lang.String getMessage()
Overrides Exception's getMessage() implementation. loadMessage() must have been called if the message has not yet been loaded from a message source. NOTE: This override returns the same message as getLocalizedMessage(). All messages are localized.

Overrides:
getMessage in class java.lang.Throwable
Returns:
The localized error message.

loadMessage

public void loadMessage(com.simba.support.IMessageSource messageSource,
                        java.util.Locale locale)
Loads the error message. The message source will be used to construct the message if this exception does not have a preformatted message. If the exception has a preformatted message, messageSource may be null.

Parameters:
messageSource - The message source to use to construct the message.
locale - The locale in which to retrieve the message.


Copyright © 2006-2014 Simba Technologies Incorporated. All Rights Reserved.