1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.scxml;
18
19
20 import org.apache.commons.scxml.semantics.ErrorConstants;
21
22 /***
23 * An interface for reporting SCXML errors to the host environment,
24 * containing the definition of commonly occuring errors while executing
25 * SCXML documents.
26 *
27 */
28 public interface ErrorReporter {
29
30 /***
31 * Handler for reporting an error.
32 *
33 * @param errCode
34 * one of the ErrorReporter's constants
35 * @param errDetail
36 * human readable description
37 * @param errCtx
38 * typically an SCXML element which caused an error,
39 * may be accompanied by additional information
40 */
41 void onError(String errCode, String errDetail, Object errCtx);
42
43 /***
44 * Missing initial state for a composite state or for the scxml root.
45 *
46 * @see org.apache.commons.scxml.model.SCXML#getInitialState()
47 * @see org.apache.commons.scxml.model.State#getInitial()
48 *
49 * @deprecated Use {@link ErrorConstants#NO_INITIAL} instead.
50 */
51 String NO_INITIAL = "NO_INITIAL";
52
53 /***
54 * An initial state for a composite state whose Transition does not.
55 * Map to a descendant of the composite state.
56 *
57 * @deprecated Use {@link ErrorConstants#ILLEGAL_INITIAL} instead.
58 */
59 String ILLEGAL_INITIAL = "ILLEGAL_INITIAL";
60
61 /***
62 * Unknown action - unsupported executable content. List of supported.
63 * actions: assign, cancel, elseif, else, if, log, send, var
64 *
65 * @deprecated Use {@link ErrorConstants#UNKNOWN_ACTION} instead.
66 */
67 String UNKNOWN_ACTION = "UNKNOWN_ACTION";
68
69 /***
70 * Illegal state machine configuration.
71 * Either a parallel exists which does not have all its AND sub-states
72 * active or there are multiple enabled OR states on the same level.
73 *
74 * @deprecated Use {@link ErrorConstants#ILLEGAL_CONFIG} instead.
75 */
76 String ILLEGAL_CONFIG = "ILLEGAL_CONFIG";
77
78 /***
79 * Non-deterministic situation has occured - there are more than
80 * one enabled transitions in conflict.
81 *
82 * @deprecated Use {@link ErrorConstants#NON_DETERMINISTIC} instead.
83 */
84 String NON_DETERMINISTIC = "NON_DETERMINISTIC";
85
86 /***
87 * A variable referred to by assign name attribute is undefined.
88 *
89 * @deprecated Use {@link ErrorConstants#UNDEFINED_VARIABLE} instead.
90 */
91 String UNDEFINED_VARIABLE = "UNDEFINED_VARIABLE";
92
93 /***
94 * An expression language error.
95 *
96 * @deprecated Use {@link ErrorConstants#EXPRESSION_ERROR} instead.
97 */
98 String EXPRESSION_ERROR = "EXPRESSION_ERROR";
99
100 }