KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > perseus > fos > api > FosException


1 /**
2  * Copyright (C) 2000
3  */

4
5 package org.objectweb.perseus.fos.api;
6
7 /**
8  * Defines the exception raised by all File Object Store related functions.
9  * @author S. Chassande-Barrioz, P. Déchamboux
10  */

11 public class FosException extends Exception JavaDoc {
12     /**
13      * The nested exception if any.
14      */

15     private Exception JavaDoc nestedException = null;
16
17     /**
18      * Constructs an exception merely with an error message.
19      * @param errmsg The error message.
20      */

21     public FosException(String JavaDoc errmsg) {
22         super(errmsg);
23     }
24
25     /**
26      * Constructs an exception with an error message and a nested exception.
27      * @param errmsg The error message.
28      */

29     public FosException(String JavaDoc errmsg, Exception JavaDoc e) {
30         super(errmsg + " [has a nested exception]");
31         nestedException = e;
32     }
33
34     /**
35      * Returns the nested exception if any.
36      * @return The nested exception.
37      */

38     public Exception JavaDoc getNestedException() {
39         return nestedException;
40     }
41 }
42
Popular Tags