com.waveset.exception
Class ValidationFailed
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.waveset.util.ExceptionWrapper
com.waveset.util.WavesetException
com.waveset.exception.ValidationFailed
- All Implemented Interfaces:
- java.io.Serializable
- public class ValidationFailed
- extends WavesetException
An exception thrown when validation fails for an object that
is being created or modified.
Typically this will be thrown from one of the visitor classes,
such as CheckinVisitor, CreateVisitor, or DeleteVisitor.
This is made a concrete subclass of WavesetException since
applications will want to catch and display the message to the
end-user.
The error message has two parameters, the type and name of the
object. The keyword of the error message is passed in, since
the same exception might be used for many different validation errors.
Hmm, we could have a separate validation exception for each type
of error, but that could make the signatures cumbersome, and applications
generally don't care what the error is, they just need to
display it. If an application does need to perform some specific
operation for different failures, they can test the the message code.
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
code_id
|
Constructor Summary |
ValidationFailed(Message msg)
Construct a new ValidationFailed with a detailed message. |
ValidationFailed(java.lang.String messageCode,
java.lang.String typeName,
java.lang.String objectName)
Construct a new ValidationFailed with a detailed message. |
Methods inherited from class com.waveset.util.WavesetException |
addMessage, addMessage, breakpoint, checkBreakpoint, enableBreakpoint, getLocalizedMessage, getLocalizedMessage, getMessage, getMessage, getMessage, getMessageObject, getMessageObject, getMessageOnly, getMessages |
Methods inherited from class com.waveset.util.ExceptionWrapper |
addException, clearExceptions, describeException, getAllMessages, getException, getException, getExceptionCount, hasException, printStackTrace, printStackTrace, printStackTrace, removeException |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getStackTrace, initCause, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
code_id
public static final java.lang.String code_id
- See Also:
- Constant Field Values
ValidationFailed
public ValidationFailed(java.lang.String messageCode,
java.lang.String typeName,
java.lang.String objectName)
- Construct a new ValidationFailed with a detailed message.
- Parameters:
typeName
- detail name of the referencing typeobjectName
- detail name of the referencing object
ValidationFailed
public ValidationFailed(Message msg)
- Construct a new ValidationFailed with a detailed message.
- Parameters:
msg
- Message object