diff --git a/guacamole-common/src/main/java/net/sourceforge/guacamole/io/ReaderGuacamoleReader.java b/guacamole-common/src/main/java/net/sourceforge/guacamole/io/ReaderGuacamoleReader.java index 0d1164083..d7ccf9bdf 100644 --- a/guacamole-common/src/main/java/net/sourceforge/guacamole/io/ReaderGuacamoleReader.java +++ b/guacamole-common/src/main/java/net/sourceforge/guacamole/io/ReaderGuacamoleReader.java @@ -41,6 +41,7 @@ import java.io.IOException; import java.io.Reader; import java.util.LinkedList; import net.sourceforge.guacamole.GuacamoleException; +import net.sourceforge.guacamole.GuacamoleServerException; import net.sourceforge.guacamole.protocol.GuacamoleInstruction; import net.sourceforge.guacamole.protocol.GuacamoleInstruction.Operation; import org.apache.commons.lang3.ArrayUtils; @@ -79,7 +80,7 @@ public class ReaderGuacamoleReader implements GuacamoleReader { return input.ready() || usedLength != 0; } catch (IOException e) { - throw new GuacamoleException(e); + throw new GuacamoleServerException(e); } } @@ -144,7 +145,7 @@ public class ReaderGuacamoleReader implements GuacamoleReader { // Handle invalid terminator characters else if (terminator != ',') - throw new GuacamoleException("Element terminator of instruction was not ';' nor ','"); + throw new GuacamoleServerException("Element terminator of instruction was not ';' nor ','"); } @@ -156,7 +157,7 @@ public class ReaderGuacamoleReader implements GuacamoleReader { // Otherwise, parse error else - throw new GuacamoleException("Non-numeric character in element length."); + throw new GuacamoleServerException("Non-numeric character in element length."); } @@ -179,7 +180,7 @@ public class ReaderGuacamoleReader implements GuacamoleReader { } catch (IOException e) { - throw new GuacamoleException(e); + throw new GuacamoleServerException(e); } } diff --git a/guacamole-common/src/main/java/net/sourceforge/guacamole/io/WriterGuacamoleWriter.java b/guacamole-common/src/main/java/net/sourceforge/guacamole/io/WriterGuacamoleWriter.java index fca0d6bf7..fb0bddc53 100644 --- a/guacamole-common/src/main/java/net/sourceforge/guacamole/io/WriterGuacamoleWriter.java +++ b/guacamole-common/src/main/java/net/sourceforge/guacamole/io/WriterGuacamoleWriter.java @@ -40,6 +40,7 @@ package net.sourceforge.guacamole.io; import java.io.IOException; import java.io.Writer; import net.sourceforge.guacamole.GuacamoleException; +import net.sourceforge.guacamole.GuacamoleServerException; import net.sourceforge.guacamole.protocol.GuacamoleInstruction; /** @@ -72,7 +73,7 @@ public class WriterGuacamoleWriter implements GuacamoleWriter { output.flush(); } catch (IOException e) { - throw new GuacamoleException(e); + throw new GuacamoleServerException(e); } } diff --git a/guacamole-common/src/main/java/net/sourceforge/guacamole/net/InetGuacamoleSocket.java b/guacamole-common/src/main/java/net/sourceforge/guacamole/net/InetGuacamoleSocket.java index af38242d6..cd5783023 100644 --- a/guacamole-common/src/main/java/net/sourceforge/guacamole/net/InetGuacamoleSocket.java +++ b/guacamole-common/src/main/java/net/sourceforge/guacamole/net/InetGuacamoleSocket.java @@ -51,6 +51,7 @@ import java.io.OutputStreamWriter; import java.net.InetSocketAddress; import java.net.SocketAddress; import net.sourceforge.guacamole.GuacamoleException; +import net.sourceforge.guacamole.GuacamoleServerException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -105,7 +106,7 @@ public class InetGuacamoleSocket implements GuacamoleSocket { } catch (IOException e) { - throw new GuacamoleException(e); + throw new GuacamoleServerException(e); } } @@ -117,7 +118,7 @@ public class InetGuacamoleSocket implements GuacamoleSocket { sock.close(); } catch (IOException e) { - throw new GuacamoleException(e); + throw new GuacamoleServerException(e); } } diff --git a/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/GuacamoleProperties.java b/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/GuacamoleProperties.java index 00128a0c5..4a9d0c67f 100644 --- a/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/GuacamoleProperties.java +++ b/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/GuacamoleProperties.java @@ -41,6 +41,7 @@ import java.io.IOException; import java.io.InputStream; import java.util.Properties; import net.sourceforge.guacamole.GuacamoleException; +import net.sourceforge.guacamole.GuacamoleServerException; /** * Simple utility class for reading properties from the guacamole.properties @@ -90,7 +91,7 @@ public class GuacamoleProperties { } catch (IOException e) { - exception = new GuacamoleException("Error reading guacamole.properties", e); + exception = new GuacamoleServerException("Error reading guacamole.properties", e); } } @@ -135,7 +136,7 @@ public class GuacamoleProperties { Type value = getProperty(property); if (value == null) - throw new GuacamoleException("Property " + property.getName() + " is required."); + throw new GuacamoleServerException("Property " + property.getName() + " is required."); return value; diff --git a/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/IntegerGuacamoleProperty.java b/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/IntegerGuacamoleProperty.java index c57003e2d..cc7615c1f 100644 --- a/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/IntegerGuacamoleProperty.java +++ b/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/IntegerGuacamoleProperty.java @@ -38,6 +38,7 @@ package net.sourceforge.guacamole.properties; * ***** END LICENSE BLOCK ***** */ import net.sourceforge.guacamole.GuacamoleException; +import net.sourceforge.guacamole.GuacamoleServerException; /** * A GuacamoleProperty whose value is an integer. @@ -58,7 +59,7 @@ public abstract class IntegerGuacamoleProperty implements GuacamoleProperty