KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > webman > stager > WrongConfigurationException


1 package webman.stager;
2
3 public class WrongConfigurationException extends Exception JavaDoc
4 {
5     private Exception JavaDoc nestedException = null;
6     private String JavaDoc description = null;
7     
8     public WrongConfigurationException(Exception JavaDoc e)
9     {
10         nestedException = e;
11     }
12     
13     public WrongConfigurationException(String JavaDoc desc)
14     {
15         description = desc;
16     }
17     
18     public String JavaDoc getMessage()
19     {
20         String JavaDoc result = "";
21         if ( description != null)
22         {
23             result += description;
24         }
25         if ( nestedException != null )
26         {
27             result += " [" + nestedException.getMessage() + "]";
28         }
29         return result;
30     }
31 }
32
Popular Tags