- * Defines the different error. This is an enum instead of custom exceptions
- * to keep the number of exceptions down. Specialized exceptions might still
- * exist, though.
- */
- public static enum Type {
-
- /** An invalid URI was specified. */
- INVALID_URI
- }
-
- /** The type of the exception. */
- private final Type type;
-
- /**
- * Creates a new Sone exception.
- *
- * @param type
- * The type of the occured error
- */
- public SoneException(Type type) {
- this.type = type;
- }
-
- /**
- * Creates a new Sone exception.
- *
- * @param type
- * The type of the occured error
- * @param message
- * The message of the exception
- */
- public SoneException(Type type, String message) {
- super(message);
- this.type = type;
- }
-
- /**