Package com.atlassian.sal.api.i18n
Class InvalidOperationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.atlassian.sal.api.i18n.InvalidOperationException
- All Implemented Interfaces:
Serializable
Thrown if the application decides that the attempted operation is not allowed for some reason.
This Exception should normally be used for "expected" errors where it is meaningful to display the error message to the end user.
Host applications throwing this Exception are expected to localise the message into the locale of the currently
logged in user. Consumers catching this Exception are encouraged to use getLocalizedMessage() in order
to get the translated error message.
- Since:
- 3.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the error message in the locale of the currently logged in user.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidOperationException
-
-
Method Details
-
getLocalizedMessage
Returns the error message in the locale of the currently logged in user.If no user is logged in, this should use the default locale for the host application.
- Overrides:
getLocalizedMessagein classThrowable- Returns:
- the error message in the locale of the currently logged in user.
- See Also:
-