1. /*
  2. * @(#)IIOException.java 1.16 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.imageio;
  8. import java.io.IOException;
  9. /**
  10. * An exception class used for signaling run-time failure of reading
  11. * and writing operations.
  12. *
  13. * <p> In addition to a message string, a reference to another
  14. * <code>Throwable</code> (<code>Error</code> or
  15. * <code>Exception</code>) is maintained. This reference, if
  16. * non-<code>null</code>, refers to the event that caused this
  17. * exception to occur. For example, an <code>IOException</code> while
  18. * reading from a <code>File</code> would be stored there.
  19. *
  20. * @version 0.5
  21. */
  22. public class IIOException extends IOException {
  23. /**
  24. * Constructs an <code>IIOException</code> with a given message
  25. * <code>String</code>. No underlying cause is set;
  26. * <code>getCause</code> will return <code>null</code>.
  27. *
  28. * @param message the error message.
  29. *
  30. * @see #getMessage
  31. */
  32. public IIOException(String message) {
  33. super(message);
  34. }
  35. /**
  36. * Constructs an <code>IIOException</code> with a given message
  37. * <code>String</code> and a <code>Throwable</code> that was its
  38. * underlying cause.
  39. *
  40. * @param message the error message.
  41. * @param cause the <code>Throwable</code> (<code>Error</code> or
  42. * <code>Exception</code>) that caused this exception to occur.
  43. *
  44. * @see #getCause
  45. * @see #getMessage
  46. */
  47. public IIOException(String message, Throwable cause) {
  48. super(message);
  49. initCause(cause);
  50. }
  51. }