Package org.apache.guacamole.language
Class TranslatableGuacamoleUpstreamException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.guacamole.GuacamoleException
org.apache.guacamole.GuacamoleUpstreamException
org.apache.guacamole.language.TranslatableGuacamoleUpstreamException
- All Implemented Interfaces:
Serializable
,Translatable
public class TranslatableGuacamoleUpstreamException
extends org.apache.guacamole.GuacamoleUpstreamException
implements Translatable
A
GuacamoleUpstreamException
whose associated message is translatable
and can be passed through an arbitrary translation service, producing a
human-readable message in the user's native language.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTranslatableGuacamoleUpstreamException
(String message, String key) Creates a new TranslatableGuacamoleUpstreamException with the given message.TranslatableGuacamoleUpstreamException
(String message, String key, Throwable cause) Creates a new TranslatableGuacamoleUpstreamException with the given message and cause.TranslatableGuacamoleUpstreamException
(String message, TranslatableMessage translatableMessage) Creates a new TranslatableGuacamoleUpstreamException with the given message.TranslatableGuacamoleUpstreamException
(String message, TranslatableMessage translatableMessage, Throwable cause) Creates a new TranslatableGuacamoleUpstreamException with the given message and cause. -
Method Summary
Modifier and TypeMethodDescriptionReturns a message which can be translated using a translation service, consisting of a translation key and optional set of substitution variables.Methods inherited from class org.apache.guacamole.GuacamoleUpstreamException
getStatus
Methods inherited from class org.apache.guacamole.GuacamoleException
getHttpStatusCode, getWebSocketCode
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
TranslatableGuacamoleUpstreamException
public TranslatableGuacamoleUpstreamException(String message, TranslatableMessage translatableMessage, Throwable cause) Creates a new TranslatableGuacamoleUpstreamException with the given message and cause. The message must be provided in both non-translatable (readable as-written) and translatable forms.- Parameters:
message
- A human-readable description of the exception that occurred. This message should be readable on its own and as-written, without requiring a translation service.translatableMessage
- A translatable, human-readable description of the exception that occurred.cause
- The cause of this exception.
-
TranslatableGuacamoleUpstreamException
public TranslatableGuacamoleUpstreamException(String message, TranslatableMessage translatableMessage) Creates a new TranslatableGuacamoleUpstreamException with the given message. The message must be provided in both non-translatable (readable as-written) and translatable forms.- Parameters:
message
- A human-readable description of the exception that occurred. This message should be readable on its own and as-written, without requiring a translation service.translatableMessage
- A translatable, human-readable description of the exception that occurred.
-
TranslatableGuacamoleUpstreamException
Creates a new TranslatableGuacamoleUpstreamException with the given message and cause. The message must be provided in both non-translatable (readable as-written) and translatable forms.- Parameters:
message
- A human-readable description of the exception that occurred. This message should be readable on its own and as-written, without requiring a translation service.key
- The arbitrary key which can be used to look up the message to be displayed in the user's native language.cause
- The cause of this exception.
-
TranslatableGuacamoleUpstreamException
Creates a new TranslatableGuacamoleUpstreamException with the given message. The message must be provided in both non-translatable (readable as-written) and translatable forms.- Parameters:
message
- A human-readable description of the exception that occurred. This message should be readable on its own and as-written, without requiring a translation service.key
- The arbitrary key which can be used to look up the message to be displayed in the user's native language.
-
-
Method Details
-
getTranslatableMessage
Description copied from interface:Translatable
Returns a message which can be translated using a translation service, consisting of a translation key and optional set of substitution variables.- Specified by:
getTranslatableMessage
in interfaceTranslatable
- Returns:
- A message which can be translated using a translation service.
-