java/sql-dk/src/info/globalcode/sql/dk/configuration/FormatterDefinition.java
branchv_0
changeset 160 84ea4a819fb2
parent 155 eb3676c6929b
child 188 54bacc7ed42b
equal deleted inserted replaced
159:9632b23df30c 160:84ea4a819fb2
   103 				return (Formatter) instance;
   103 				return (Formatter) instance;
   104 			} else {
   104 			} else {
   105 				throw new FormatterException("Formatter " + instance + " does not implement the " + Formatter.class.getName() + " interface");
   105 				throw new FormatterException("Formatter " + instance + " does not implement the " + Formatter.class.getName() + " interface");
   106 			}
   106 			}
   107 		} catch (ClassNotFoundException e) {
   107 		} catch (ClassNotFoundException e) {
   108 			throw new FormatterException("No formatter class with name: " + className, e);
   108 			throw new FormatterException("Formatter class does not exist: " + className, e);
   109 		} catch (NoSuchMethodException e) {
   109 		} catch (NoSuchMethodException e) {
   110 			throw new FormatterException("Formatter class with no valid constructor: " + className, e);
   110 			throw new FormatterException("Formatter class with no valid constructor: " + className, e);
   111 		} catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
   111 		} catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
   112 			throw new FormatterException("Formatter's constructor caused an error: " + className, e);
   112 			throw new FormatterException("Formatter's constructor caused an error: " + className, e);
   113 		}
   113 		}