From 494e611008d91ac7560e7531e21d0356b965fb7d Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 18 Mar 2014 16:54:04 -0700 Subject: [PATCH] GUAC-547: Define status for server exception - avoid future problems when generic error status changes. --- .../guacamole/GuacamoleServerException.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/guacamole-common/src/main/java/org/glyptodon/guacamole/GuacamoleServerException.java b/guacamole-common/src/main/java/org/glyptodon/guacamole/GuacamoleServerException.java index 033a9e4df..d37ec1b9e 100644 --- a/guacamole-common/src/main/java/org/glyptodon/guacamole/GuacamoleServerException.java +++ b/guacamole-common/src/main/java/org/glyptodon/guacamole/GuacamoleServerException.java @@ -22,6 +22,8 @@ package org.glyptodon.guacamole; +import org.glyptodon.guacamole.protocol.GuacamoleStatus; + /** * A generic exception thrown when part of the Guacamole API encounters @@ -33,7 +35,7 @@ package org.glyptodon.guacamole; public class GuacamoleServerException extends GuacamoleException { /** - * Creates a new GuacamoleException with the given message and cause. + * Creates a new GuacamoleServerException with the given message and cause. * * @param message A human readable description of the exception that * occurred. @@ -44,7 +46,7 @@ public class GuacamoleServerException extends GuacamoleException { } /** - * Creates a new GuacamoleException with the given message. + * Creates a new GuacamoleServerException with the given message. * * @param message A human readable description of the exception that * occurred. @@ -54,7 +56,7 @@ public class GuacamoleServerException extends GuacamoleException { } /** - * Creates a new GuacamoleException with the given cause. + * Creates a new GuacamoleServerException with the given cause. * * @param cause The cause of this exception. */ @@ -62,4 +64,9 @@ public class GuacamoleServerException extends GuacamoleException { super(cause); } + @Override + public GuacamoleStatus getStatus() { + return GuacamoleStatus.SERVER_ERROR; + } + }