1 2 package net.sf.invicta.type; 3 4 import net.sf.invicta.InvictaException; 5 6 9 public class InvictaTypeException extends InvictaException { 10 11 14 public InvictaTypeException(String message) { 15 super(message); 16 } 17 18 19 public static InvictaTypeException typeInheritanceCycle(String typeName) { 20 return new InvictaTypeException( 21 "Type definition inheritance cycle. Involved type: '" + typeName + "'"); 22 } 23 24 public static InvictaTypeException typeDefinitionNotFound(String typeName) { 25 return new InvictaTypeException( 26 "Definition file for type '" + typeName + "' was not found."); 27 } 28 29 public static InvictaTypeException conflictingDefinedProperties(String typeName, String propertyName) { 30 return new InvictaTypeException( 31 "Conflicting defined properties for '" + propertyName + "' for type '" + typeName + "'"); 32 } 33 34 public static InvictaTypeException duplicateTargetTemplate(String typeName, String targetName) { 35 return new InvictaTypeException( 36 "Duplicate target template '" + targetName + "' for type '" + typeName + "'"); 37 } 38 39 public static InvictaTypeException conflictingTargetTemplates(String typeName, String targetName) { 40 return new InvictaTypeException( 41 "Conflicting target template '" + targetName + "' for type '" + typeName + "'"); 42 } 43 44 public static InvictaTypeException parentTargetUndefined(String typeName, String targetName) { 45 return new InvictaTypeException( 46 "Target '" + targetName + "' is not defined for a parent of '" + typeName + "'"); 47 } 48 49 public static InvictaTypeException targetUndefined(String typeName, String targetName) { 50 return new InvictaTypeException( 51 "Target '" + targetName + "' is undefined for type '" + typeName + "'"); 52 } 53 54 public static InvictaTypeException missingPropertyAttribute(String name, String attribute) { 55 return new InvictaTypeException( 56 "Attribute '" + attribute + "' must be specified for property '" + name); 57 } 58 59 } 60 | Popular Tags |