package nxm.sys.lib;

/** Sub-class for IO exceptions that are generated due to errors that occur in NeXtMidas
processing. This class is nearly identical to a {@link RuntimeException}, however
it is recommended that all library and primitive writers use this class for File IO
Exceptions within NeXtMidas.

@author  Jeanette McCall
@since   NeXtMidas 3.7.1 for NXM-2758 (File Write and Read Exceptions need to be propagated)
*/

public class MidasIOException extends MidasException {

  /** NOTE: this should be changed if the structure/fields of this class changes. */
  private static final long serialVersionUID = 5739977870635696186L;

  /** Construct a new MidasException. */
  public MidasIOException () { this(null,null,null); }

  /** Construct a MidasException with the specified detail message.
      @param msg A string containing the text of the message.
   */
  public MidasIOException (String msg) { this(msg,null,null); }

  /** Constructs a new exception that includes a message about the "root cause" exception that
      interfered with its normal operation, including a description message.
      @param msg      A string containing the text of the message.
      @param details  Details about the exception or null if none are available.
   */
  public MidasIOException (String msg, String details) { this(msg,details,null); }

  /** Initialize a new instance with the specified source Throwable with no new detail message.
      @param cause The root cause of this exception.
   */
  public MidasIOException (Throwable cause) { this(null,null,cause); }

  /** Constructs a new exception that includes a message about the "root cause" exception that
      interfered with its normal operation, including a description message.
      @param msg   A string containing the text of the message.
      @param cause The root cause of this exception.
   */
  public MidasIOException (String msg, Throwable cause) { this(msg,null,cause); }

  /** Constructs a new IO exception that includes a message about the "root cause" exception that
      interfered with its normal operation, including a description message.
      @param msg      A string containing the text of the message.
      @param details  Details about the exception or null if none are available.
      @param cause    The root cause of this exception.
   */
  public MidasIOException (String msg, String details, Throwable cause) {
    super(msg,details,cause);
  }

}
