1 package webman.stager; 2 3 public class WrongConfigurationException extends Exception  4 { 5 private Exception nestedException = null; 6 private String description = null; 7 8 public WrongConfigurationException(Exception e) 9 { 10 nestedException = e; 11 } 12 13 public WrongConfigurationException(String desc) 14 { 15 description = desc; 16 } 17 18 public String getMessage() 19 { 20 String 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 |