From 68e101f58a31c6fb06680b618665c35ace0b8a44 Mon Sep 17 00:00:00 2001 From: Nick Couchman Date: Wed, 7 Feb 2018 22:57:21 -0500 Subject: [PATCH] GUACAMOLE-504: Add getHttpStatusCode() method to GuacamoleException class. --- .../java/org/apache/guacamole/GuacamoleException.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 1b2226df3..f0a81d1f0 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(); + } }