aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/exceptions
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2015-12-16 00:53:04 +0100
committersteckbrief <steckbrief@chefmail.de>2015-12-16 00:53:04 +0100
commitc26335f3e366110366eb89025a42875bcb7840a9 (patch)
treef6ae254a0bf0a8ce2d9e43efd48a5eba6e454b4f /src/main/java/de/thedevstack/conversationsplus/exceptions
parent556697c47e74766215c17fb5f721d71494a02643 (diff)
Implements FS#19, FS#84; Introduces ImageResizeException, MessageUtil and distinguishes between image resizing and compressing/saving
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/exceptions')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/exceptions/FileCopyException.java15
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/exceptions/ImageResizeException.java16
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/exceptions/UiException.java22
3 files changed, 45 insertions, 8 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/exceptions/FileCopyException.java b/src/main/java/de/thedevstack/conversationsplus/exceptions/FileCopyException.java
index 58363c0f..858b4563 100644
--- a/src/main/java/de/thedevstack/conversationsplus/exceptions/FileCopyException.java
+++ b/src/main/java/de/thedevstack/conversationsplus/exceptions/FileCopyException.java
@@ -1,14 +1,13 @@
package de.thedevstack.conversationsplus.exceptions;
-public class FileCopyException extends Exception {
+public class FileCopyException extends UiException {
private static final long serialVersionUID = -1010013599132881427L;
- private int resId;
- public FileCopyException(int resId) {
- this.resId = resId;
- }
+ public FileCopyException(int resId) {
+ super(resId);
+ }
- public int getResId() {
- return resId;
- }
+ public FileCopyException(int resId, Throwable e) {
+ super(resId, e);
+ }
} \ No newline at end of file
diff --git a/src/main/java/de/thedevstack/conversationsplus/exceptions/ImageResizeException.java b/src/main/java/de/thedevstack/conversationsplus/exceptions/ImageResizeException.java
new file mode 100644
index 00000000..b5786990
--- /dev/null
+++ b/src/main/java/de/thedevstack/conversationsplus/exceptions/ImageResizeException.java
@@ -0,0 +1,16 @@
+package de.thedevstack.conversationsplus.exceptions;
+
+/**
+ * Created by tzur on 15.12.2015.
+ */
+public class ImageResizeException extends UiException {
+ private static final long serialVersionUID = -1010013599112881427L;
+
+ public ImageResizeException(int resId) {
+ super(resId);
+ }
+
+ public ImageResizeException(int resId, Throwable e) {
+ super(resId, e);
+ }
+}
diff --git a/src/main/java/de/thedevstack/conversationsplus/exceptions/UiException.java b/src/main/java/de/thedevstack/conversationsplus/exceptions/UiException.java
new file mode 100644
index 00000000..b05c5025
--- /dev/null
+++ b/src/main/java/de/thedevstack/conversationsplus/exceptions/UiException.java
@@ -0,0 +1,22 @@
+package de.thedevstack.conversationsplus.exceptions;
+
+/**
+ * Exception to be shown in UI.
+ */
+public class UiException extends Exception {
+ private static final long serialVersionUID = -1010015239132881427L;
+ private int resId;
+
+ public UiException(int resId) {
+ this.resId = resId;
+ }
+
+ public UiException(int resId, Throwable e) {
+ super(e);
+ this.resId = resId;
+ }
+
+ public int getResId() {
+ return resId;
+ }
+}