Revision 672 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/dynobject/impl/DynClassImportHelper.java
DynClassImportHelper.java | ||
---|---|---|
500 | 500 |
field.setClassOfValue(klass); |
501 | 501 |
} catch (DynFieldIsNotAContainerException e) { |
502 | 502 |
throw new IncompatibleAttributeValueException(parser, |
503 |
FIELD_NAME_TAG);
|
|
503 |
FIELD_NAME_TAG, value);
|
|
504 | 504 |
} catch (ClassNotFoundException e) { |
505 |
throw new CantLocateClassException(parser, FIELD_NAME_TAG); |
|
505 |
throw new CantLocateClassException(parser, FIELD_NAME_TAG, |
|
506 |
value); |
|
506 | 507 |
} |
507 | 508 |
} |
508 | 509 |
} |
... | ... | |
766 | 767 |
*/ |
767 | 768 |
private static final long serialVersionUID = 5733585544096433612L; |
768 | 769 |
|
769 |
public CantLocateClassException(XmlPullParser parser, String tagname) { |
|
770 |
super(parser, "Can't locate class '%(name).", |
|
771 |
"_Cant_locate_class_XnameX", serialVersionUID); |
|
772 |
this.setValue("name", tagname); |
|
773 |
} |
|
770 |
public CantLocateClassException(XmlPullParser parser, String tagname) { |
|
771 |
super(parser, "Can't locate class named in attribute '%(name)'.", |
|
772 |
"_Cant_locate_class_XnameX", serialVersionUID); |
|
773 |
this.setValue("name", tagname); |
|
774 |
} |
|
775 |
|
|
776 |
public CantLocateClassException(XmlPullParser parser, String tagname, |
|
777 |
String className) { |
|
778 |
super(parser, "Can't locate class named in attribute '%(name)' " |
|
779 |
+ "whose name is '%(className)'.", "_Cant_locate_class_XnameX", |
|
780 |
serialVersionUID); |
|
781 |
this.setValue("name", tagname); |
|
782 |
this.setValue("className", className); |
|
783 |
} |
|
774 | 784 |
} |
775 | 785 |
|
776 | 786 |
public static class CantLocateDynClassException extends |
... | ... | |
798 | 808 |
|
799 | 809 |
public IncompatibleAttributeValueException(XmlPullParser parser, |
800 | 810 |
String name) { |
801 |
super(parser, "incompatible attribute value for field '%(name).",
|
|
811 |
super(parser, "Incompatible attribute value for field '%(name)'.",
|
|
802 | 812 |
"_Incompatible_attribute_value_for_field_XnameX", |
803 | 813 |
serialVersionUID); |
804 | 814 |
this.setValue("name", name); |
805 | 815 |
} |
816 |
|
|
817 |
public IncompatibleAttributeValueException(XmlPullParser parser, |
|
818 |
String name, String value) { |
|
819 |
super( |
|
820 |
parser, |
|
821 |
"Incompatible attribute value '%(value)', for field '%(name)'.", |
|
822 |
"_Incompatible_attribute_value_for_field_XnameX", |
|
823 |
serialVersionUID); |
|
824 |
this.setValue("name", name); |
|
825 |
this.setValue("value", value); |
|
826 |
} |
|
806 | 827 |
} |
807 | 828 |
|
808 | 829 |
public static class ParseCoerceException extends ImportDynClassesException { |
Also available in: Unified diff