You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2018/02/14 23:41:58 UTC
[03/12] guacamole-client git commit: GUACAMOLE-504: Add
getHttpStatusCode() method to GuacamoleException class.
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 <vn...@apache.org>
Authored: Wed Feb 7 22:57:21 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
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();
+ }
}