| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||||
| ErrorReporter |
|
| 1.0;1 |
| 1 | /* |
|
| 2 | * |
|
| 3 | * Copyright 2005 The Apache Software Foundation. |
|
| 4 | * |
|
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 6 | * you may not use this file except in compliance with the License. |
|
| 7 | * You may obtain a copy of the License at |
|
| 8 | * |
|
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 10 | * |
|
| 11 | * Unless required by applicable law or agreed to in writing, software |
|
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 14 | * See the License for the specific language governing permissions and |
|
| 15 | * limitations under the License. |
|
| 16 | * |
|
| 17 | */ |
|
| 18 | package org.apache.commons.scxml; |
|
| 19 | ||
| 20 | /** |
|
| 21 | * An interface for reporting SCXML errors to the host environment, |
|
| 22 | * containing the definition of commonly occuring errors while executing |
|
| 23 | * SCXML documents. |
|
| 24 | * |
|
| 25 | */ |
|
| 26 | public interface ErrorReporter { |
|
| 27 | ||
| 28 | /** |
|
| 29 | * Handler for reporting an error. |
|
| 30 | * |
|
| 31 | * @param errCode |
|
| 32 | * one of the ErrorReporter's constants |
|
| 33 | * @param errDetail |
|
| 34 | * human readable description |
|
| 35 | * @param errCtx |
|
| 36 | * typically an SCXML element which caused an error, |
|
| 37 | * may be accompanied by additional information |
|
| 38 | */ |
|
| 39 | void onError(String errCode, String errDetail, Object errCtx); |
|
| 40 | ||
| 41 | /** |
|
| 42 | * Missing initial state for a composite state or for the smxml root. |
|
| 43 | * |
|
| 44 | * @see org.apache.commons.scxml.model.SCXML#getInitialState() |
|
| 45 | * @see org.apache.commons.scxml.model.State#getInitial() |
|
| 46 | */ |
|
| 47 | String NO_INITIAL = "NO_INITIAL"; |
|
| 48 | ||
| 49 | /** |
|
| 50 | * An initial state for a composite state whose Transition does not. |
|
| 51 | * Map to a descendant of the composite state. |
|
| 52 | * |
|
| 53 | */ |
|
| 54 | String ILLEGAL_INITIAL = "ILLEGAL_INITIAL"; |
|
| 55 | ||
| 56 | /** |
|
| 57 | * Unknown action - unsupported executable content. List of supported. |
|
| 58 | * actions: assign, cancel, elseif, else, if, log, send, var |
|
| 59 | */ |
|
| 60 | String UNKNOWN_ACTION = "UNKNOWN_ACTION"; |
|
| 61 | ||
| 62 | /** |
|
| 63 | * Illegal state machine configuration. |
|
| 64 | * Either a parallel exists which does not have all its AND sub-states |
|
| 65 | * active or there are multiple enabled OR states on the same level. |
|
| 66 | */ |
|
| 67 | String ILLEGAL_CONFIG = "ILLEGAL_CONFIG"; |
|
| 68 | ||
| 69 | /** |
|
| 70 | * Non-deterministic situation has occured - there are more than |
|
| 71 | * one enabled transitions in conflict. |
|
| 72 | */ |
|
| 73 | String NON_DETERMINISTIC = "NON_DETERMINISTIC"; |
|
| 74 | ||
| 75 | /** |
|
| 76 | * A variable referred to by assign name attribute is undefined. |
|
| 77 | */ |
|
| 78 | String UNDEFINED_VARIABLE = "UNDEFINED_VARIABLE"; |
|
| 79 | ||
| 80 | /** |
|
| 81 | * An expression language error. |
|
| 82 | */ |
|
| 83 | String EXPRESSION_ERROR = "EXPRESSION_ERROR"; |
|
| 84 | ||
| 85 | } |