java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.github.mmm.base.exception.ApplicationException
io.github.mmm.base.exception.ReadOnlyException
- All Implemented Interfaces:
Localizable,LocalizableObject,Serializable
A
ATTENTION:
Please design your APIs in a way to prevent such exception where ever possible. However for generic access to objects that can be mutable or read-only this exception is the right choice.
ReadOnlyException is thrown if the modification of something failed because it is read-only. Here something
can be the property of a java object, an attribute in a persistent store, a file, etc. ATTENTION:
Please design your APIs in a way to prevent such exception where ever possible. However for generic access to objects that can be mutable or read-only this exception is the right choice.
- See Also:
-
Field Summary
FieldsFields inherited from interface io.github.mmm.base.i18n.Localizable
BUNDLE_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionReadOnlyException(Object object) The constructor.ReadOnlyException(Object object, Object attribute) The constructor.ReadOnlyException(Throwable cause, Object object) The constructor.ReadOnlyException(Throwable cause, Object object, Object attribute) The constructor. -
Method Summary
Methods inherited from class io.github.mmm.base.exception.ApplicationException
createUuid, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getMessage, getNlsMessage, getNlsMessage, getUuid, isForUser, isTechnical, printStackTrace, toString, toString, toStringMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTraceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.mmm.base.i18n.Localizable
getArgument, toLocalizable
-
Field Details
-
MESSAGE_CODE
- See Also:
-
-
Constructor Details
-
ReadOnlyException
The constructor.- Parameters:
object- is the object that is read-only and can not be modified.
-
ReadOnlyException
The constructor.- Parameters:
object- is the object that is read-only and can not be modified.attribute- is the attribute ofobjectthat can not be modified.- Since:
- 3.1.0
-
ReadOnlyException
The constructor.- Parameters:
cause- is thecauseof this exception.object- is the object that is read-only and can not be modified.
-
ReadOnlyException
The constructor.- Parameters:
cause- is thecauseof this exception.object- is the object that is read-only and can not be modified.attribute- is the attribute ofobjectthat can not be modified.
-
-
Method Details
-
getCode
Description copied from class:ApplicationExceptionThis method gets the code that identifies the detailed type of this object. WhileUUIDis unique per instance of aApplicationExceptionthis code is a short and readable identifier representing theApplicationExceptionClass. The default implementation returns thesimple name. However, the code should remain stable after refactoring (so at least after the rename the previous code should be returned asStringliteral). This code may be used as a compact identifier to reference the related problem or information as well as for automatic tests of error situations that should remain stable even if the message text gets improved or the locale is unknown.- Overrides:
getCodein classApplicationException- Returns:
- the error code.
-