View Javadoc

1   /*
2    * $Id DatabaseAccessException.java $
3    *
4    */
5   
6   package org.astrogrid.datacenter.fits;
7   
8   import java.io.IOException;
9   
10  
11  /***
12   * An exception for generation by fits file readers
13   * <p>
14   * The original exception should wherever possible be preserved as the cause
15   *
16   * @author M Hill
17   */
18  
19  public class FitsFormatException extends IOException
20  {
21     /***
22      * Constructor taking the cause of the error (an exception/error) and
23      * a message describing the context
24      */
25     public FitsFormatException(String message, Throwable cause)
26     {
27        super(message);
28        initCause(cause);
29     }
30  
31     /***
32      * Convenience constructor that just takes the cause of the error
33      */
34     public FitsFormatException(Throwable cause)
35     {
36        super("");
37        initCause(cause);
38     }
39  
40     /***
41      * THis constructor should NOT be used when catching & rethrowing
42      * exceptions - in such cases use a constructor which takes a throwable, to
43      * preserve the original information
44      */
45     public FitsFormatException(String message)
46     {
47        super(message);
48     }
49     
50  }
51  
52  /*
53  $Log: FitsFormatException.java,v $
54  Revision 1.1  2004/09/28 15:02:13  mch
55  Merged PAL and server packages
56  
57  Revision 1.1  2004/07/12 23:25:58  mch
58  Better error reporting
59  
60  Revision 1.1  2004/03/12 04:45:26  mch
61  It05 MCH Refactor
62  
63  Revision 1.3  2003/12/03 17:58:25  mch
64  Fixed initCause error
65  
66  Revision 1.2  2003/12/03 16:05:46  mch
67  Now extends RemoteException which should give better error reporting at the web client
68  
69  Revision 1.1  2003/11/14 00:38:29  mch
70  Code restructure
71  
72  Revision 1.3  2003/09/08 16:34:31  mch
73  Added documentation
74  
75  Revision 1.2  2003/09/07 18:54:47  mch
76  Fix for null causes
77  
78  Revision 1.1  2003/08/27 17:34:56  mch
79  Now subclassed (more appropriately) from IOException
80  
81  */