01: package net.sf.invicta.process;
02:
03: import net.sf.invicta.InvictaException;
04:
05: /**
06: * An exception to be thrown by classes of the main process module (package).
07: */
08: public class InvictaProcessException extends InvictaException {
09:
10: /**
11: * @param message
12: */
13: public InvictaProcessException(String message) {
14: super (message);
15: }
16:
17: public static InvictaProcessException fileIOError(String fileName,
18: Exception exception) {
19: return new InvictaProcessException("IO Error in reading file '"
20: + fileName + "': " + exception.getMessage());
21: }
22:
23: public static InvictaProcessException propertyVariableCycle(
24: String propertyName) {
25: return new InvictaProcessException(
26: "Invicta property variable cycle (involving '"
27: + propertyName + "')");
28: }
29:
30: public static InvictaProcessException propertyUndefined(
31: String propertyName) {
32: return new InvictaProcessException("Invicta property '"
33: + propertyName + "' is undefined !");
34: }
35:
36: public static InvictaProcessException propertyVariableSyntaxError() {
37: return new InvictaProcessException(
38: "Invicta property variable syntax error");
39: }
40:
41: public static InvictaProcessException propertyUndefined(
42: String typeName, String componentName, String propertyName) {
43: return new InvictaProcessException("Property '" + propertyName
44: + "' required for type '" + typeName
45: + "' is not defined in component '" + componentName
46: + "'");
47: }
48:
49: public static InvictaProcessException projectPropertyUndefined(
50: String typeName, String propertyName) {
51: return new InvictaProcessException("Project property '"
52: + propertyName + "' required for type '" + typeName
53: + "' is not defined.");
54: }
55:
56: public static InvictaProcessException conflictingGeneralProperties(
57: String typeName, String propertyName) {
58: return new InvictaProcessException(
59: "Conflicting values of the general property '"
60: + propertyName + "'. Involved type: '"
61: + typeName);
62: }
63:
64: }
|