Package org.apache.guacamole
Class GuacamoleException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.guacamole.GuacamoleException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
GuacamoleClientException
,GuacamoleServerException
,GuacamoleUpstreamException
A generic exception thrown when parts of the Guacamole API encounter
errors.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGuacamoleException
(String message) Creates a new GuacamoleException with the given message.GuacamoleException
(String message, Throwable cause) Creates a new GuacamoleException with the given message and cause.GuacamoleException
(Throwable cause) Creates a new GuacamoleException with the given cause. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the most applicable HTTP status code that can be associated with this exception.Returns the Guacamole status associated with this exception.int
Returns the most applicable WebSocket status code that can be associated with this exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
GuacamoleException
Creates a new GuacamoleException with the given message and cause.- Parameters:
message
- A human readable description of the exception that occurred.cause
- The cause of this exception.
-
GuacamoleException
Creates a new GuacamoleException with the given message.- Parameters:
message
- A human readable description of the exception that occurred.
-
GuacamoleException
Creates a new GuacamoleException with the given cause.- Parameters:
cause
- The cause of this exception.
-
-
Method Details
-
getStatus
Returns the Guacamole status associated with this exception. This status can then be easily translated into an HTTP error code or Guacamole protocol error code.- Returns:
- The corresponding Guacamole status.
-
getHttpStatusCode
public int getHttpStatusCode()Returns the most applicable HTTP status code that can be associated with this exception.- Returns:
- An integer representing the most applicable HTTP status code associated with this exception.
-
getWebSocketCode
public int getWebSocketCode()Returns the most applicable WebSocket status code that can be associated with this exception.- Returns:
- An integer representing the most applicable WebSocket status code associated with this exception.
-