1 7 8 package org.jdesktop.swing.data; 9 10 17 public class ConversionException extends Exception { 18 19 25 public ConversionException(Object value, Class fromClass) { 26 this("could not convert value from class " + fromClass.getName() + 27 "to a string"); 28 } 29 30 37 public ConversionException(Object value, Class fromClass, Throwable cause) { 38 this("could not convert value from class " + fromClass.getName() + 39 "to a string", cause); 40 } 41 42 49 public ConversionException(String value, Class toClass) { 50 this("could not convert string value \"" + value + "\" to " + 51 toClass.getName()); 52 } 53 54 62 public ConversionException(String value, Class toClass, Throwable cause) { 63 this("could not convert string value \"" + value + "\" to " + 64 toClass.getName(), cause); 65 } 66 67 71 public ConversionException(String message) { 72 super(message); 73 } 74 75 80 public ConversionException(String message, Throwable cause) { 81 super(message, cause); 82 } 83 84 } 85 | Popular Tags |