GUACAMOLE-504: Add getHttpStatusCode() method to GuacamoleException class.
Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/68e101f5 Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/68e101f5 Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/68e101f5 Branch: refs/heads/master Commit: 68e101f58a31c6fb06680b618665c35ace0b8a44 Parents: 1e1679e Author: Nick Couchman <[email protected]> Authored: Wed Feb 7 22:57:21 2018 -0500 Committer: Nick Couchman <[email protected]> Committed: Fri Feb 9 13:17:08 2018 -0500 ---------------------------------------------------------------------- .../java/org/apache/guacamole/GuacamoleException.java | 10 ++++++++++ 1 file changed, 10 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/68e101f5/guacamole-common/src/main/java/org/apache/guacamole/GuacamoleException.java ---------------------------------------------------------------------- diff --git a/guacamole-common/src/main/java/org/apache/guacamole/GuacamoleException.java b/guacamole-common/src/main/java/org/apache/guacamole/GuacamoleException.java index 1b2226d..f0a81d1 100644 --- a/guacamole-common/src/main/java/org/apache/guacamole/GuacamoleException.java +++ b/guacamole-common/src/main/java/org/apache/guacamole/GuacamoleException.java @@ -68,5 +68,15 @@ public class GuacamoleException extends Exception { public GuacamoleStatus getStatus() { return GuacamoleStatus.SERVER_ERROR; } + + /** + * Returns the numeric HTTP status code associated with this exception. + * + * @return + * The numeric HTTP status code associated with this exception. + */ + public Integer getHttpStatusCode() { + return getStatus().getHttpStatusCode(); + } }
