cst.common.system
Class CSTException
java.lang.Object
java.lang.Throwable
java.lang.Exception
cst.common.system.CSTException
- All Implemented Interfaces:
- java.io.Serializable
public class CSTException
- extends java.lang.Exception
A checked exception which contains one or more CSTError
s, each
of which is represented by a human-readable error message and a machine-readable
error code.
The class has methods for determining the total number of errors and the number of
errors for a given error code. These methods are used extensively in automated test suites for
verifying the type and number of errors generated in test cases used to induce errors.
Copyright 2010 Medical Research Council Unit for Lifelong Health and Ageing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- Version:
- 1.0
- Author:
- Kevin Garwood (kgarwood@users.sourceforge.net)
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CSTException
public CSTException(CSTErrorType errorType,
java.lang.String errorMessage)
CSTException
public CSTException(CSTErrorType errorType,
java.lang.String mainMessage,
java.util.ArrayList<CSTError> errors)
setErrors
public void setErrors(java.util.ArrayList<CSTError> errors)
printErrors
public void printErrors()
getMainMessage
public java.lang.String getMainMessage()
getErrorCount
public int getErrorCount()
getErrors
public java.util.ArrayList<CSTError> getErrors()
getErrorsForType
public int getErrorsForType(CSTErrorType errorType)