View Javadoc

1   /*
2    * $Id DatabaseAccessException.java $
3    *
4    */
5   
6   package org.astrogrid.dataservice.metadata;
7   
8   import java.io.IOException;
9   
10  
11  /***
12   * An exception for when things go wrong generating metadata
13   * <p>
14   * The original exception should wherever possible be preserved as the cause
15   *
16   * @author M Hill
17   */
18  
19  public class MetadataException 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 MetadataException(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 MetadataException(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 MetadataException(String message)
46     {
47        super(message);
48     }
49     
50  }
51  
52  /*
53  $Log: MetadataException.java,v $
54  Revision 1.1.1.1  2005/02/17 18:37:34  mch
55  Initial checkin
56  
57  Revision 1.1.1.1  2005/02/16 17:11:24  mch
58  Initial checkin
59  
60  Revision 1.1  2004/09/28 15:02:13  mch
61  Merged PAL and server packages
62  
63  Revision 1.1  2004/09/06 20:23:00  mch
64  Replaced metadata generators/servers with plugin mechanism. Added Authority plugin
65  
66  */