KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > invicta > process > InvictaProcessException


1 package net.sf.invicta.process;
2
3 import net.sf.invicta.InvictaException;
4
5 /**
6  * An exception to be thrown by classes of the main process module (package).
7  */

8 public class InvictaProcessException extends InvictaException {
9
10     /**
11      * @param message
12      */

13     public InvictaProcessException(String JavaDoc message) {
14         super(message);
15     }
16     
17
18     public static InvictaProcessException fileIOError(String JavaDoc fileName, Exception JavaDoc exception) {
19         return new InvictaProcessException(
20             "IO Error in reading file '" + fileName + "': " + exception.getMessage());
21     }
22     
23     public static InvictaProcessException propertyVariableCycle(String JavaDoc propertyName) {
24         return new InvictaProcessException(
25             "Invicta property variable cycle (involving '" + propertyName + "')");
26     }
27     
28     public static InvictaProcessException propertyUndefined(String JavaDoc propertyName) {
29         return new InvictaProcessException(
30             "Invicta property '" + propertyName + "' is undefined !");
31     }
32
33     public static InvictaProcessException propertyVariableSyntaxError() {
34         return new InvictaProcessException(
35             "Invicta property variable syntax error");
36     }
37     
38     public static InvictaProcessException propertyUndefined(String JavaDoc typeName, String JavaDoc componentName, String JavaDoc propertyName) {
39         return new InvictaProcessException(
40                 "Property '" + propertyName + "' required for type '" + typeName +
41                 "' is not defined in component '" + componentName + "'");
42     }
43     
44     
45     public static InvictaProcessException projectPropertyUndefined(String JavaDoc typeName, String JavaDoc propertyName) {
46         return new InvictaProcessException(
47                 "Project property '" + propertyName + "' required for type '"
48                     + typeName + "' is not defined.");
49     }
50     
51     public static InvictaProcessException conflictingGeneralProperties(String JavaDoc typeName, String JavaDoc propertyName) {
52         return new InvictaProcessException("Conflicting values of the general property '" + propertyName + "'. Involved type: '" + typeName);
53     }
54                 
55 }
56
Popular Tags