summaryrefslogtreecommitdiffstats
path: root/lib/Exceptions
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-05-22 09:50:53 +0200
committerJoas Schilling <coding@schilljs.com>2020-06-10 16:26:50 +0200
commit72afa27a8a70f7597bcb0d4257efe014af9521dc (patch)
tree40311988ac6dd1d3fe38bcf50cf3f51e4ce4f4e4 /lib/Exceptions
parent8d41e17ebdd11af86d5cfb5242208f67c9991d39 (diff)
Refactor API requests into a service and data objects
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/Exceptions')
-rw-r--r--lib/Exceptions/HostedSignalingServerAPIException.php14
-rw-r--r--lib/Exceptions/HostedSignalingServerInputException.php14
2 files changed, 28 insertions, 0 deletions
diff --git a/lib/Exceptions/HostedSignalingServerAPIException.php b/lib/Exceptions/HostedSignalingServerAPIException.php
new file mode 100644
index 000000000..a23432530
--- /dev/null
+++ b/lib/Exceptions/HostedSignalingServerAPIException.php
@@ -0,0 +1,14 @@
+<?php
+
+
+namespace OCA\Talk\Exceptions;
+
+/**
+ * Exception that is thrown when an API error happened. The message itself is already translated and can be handed out to the user.
+ *
+ * This exception should be used for the code flow and not for logging
+ *
+ * This exception indicates a problem with the server, API, conenction or responses.
+ */
+class HostedSignalingServerAPIException extends \Exception {
+}
diff --git a/lib/Exceptions/HostedSignalingServerInputException.php b/lib/Exceptions/HostedSignalingServerInputException.php
new file mode 100644
index 000000000..23d284ef0
--- /dev/null
+++ b/lib/Exceptions/HostedSignalingServerInputException.php
@@ -0,0 +1,14 @@
+<?php
+
+
+namespace OCA\Talk\Exceptions;
+
+/**
+ * Exception that is thrown when an API error happened. The message itself is already translated and can be handed out to the user.
+ *
+ * This exception should be used for the code flow and not for logging.
+ *
+ * This exception indicates user solvable issues - like an already existing account or invalid input.
+ */
+class HostedSignalingServerInputException extends \Exception {
+}