summaryrefslogtreecommitdiffstats
path: root/vendor/maennchen/zipstream-php/src/Exception
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--vendor/maennchen/zipstream-php/src/Exception.php12
-rw-r--r--vendor/maennchen/zipstream-php/src/Exception/EncodingException.php14
-rw-r--r--vendor/maennchen/zipstream-php/src/Exception/FileNotFoundException.php23
-rw-r--r--vendor/maennchen/zipstream-php/src/Exception/FileNotReadableException.php23
-rw-r--r--vendor/maennchen/zipstream-php/src/Exception/IncompatibleOptionsException.php14
-rw-r--r--vendor/maennchen/zipstream-php/src/Exception/OverflowException.php18
-rw-r--r--vendor/maennchen/zipstream-php/src/Exception/StreamNotReadableException.php23
7 files changed, 127 insertions, 0 deletions
diff --git a/vendor/maennchen/zipstream-php/src/Exception.php b/vendor/maennchen/zipstream-php/src/Exception.php
new file mode 100644
index 0000000..03a8767
--- /dev/null
+++ b/vendor/maennchen/zipstream-php/src/Exception.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace ZipStream;
+
+/**
+ * This class is only for inheriting
+ */
+abstract class Exception extends \Exception
+{
+}
diff --git a/vendor/maennchen/zipstream-php/src/Exception/EncodingException.php b/vendor/maennchen/zipstream-php/src/Exception/EncodingException.php
new file mode 100644
index 0000000..5b0267d
--- /dev/null
+++ b/vendor/maennchen/zipstream-php/src/Exception/EncodingException.php
@@ -0,0 +1,14 @@
+<?php
+
+declare(strict_types=1);
+
+namespace ZipStream\Exception;
+
+use ZipStream\Exception;
+
+/**
+ * This Exception gets invoked if file or comment encoding is incorrect
+ */
+class EncodingException extends Exception
+{
+}
diff --git a/vendor/maennchen/zipstream-php/src/Exception/FileNotFoundException.php b/vendor/maennchen/zipstream-php/src/Exception/FileNotFoundException.php
new file mode 100644
index 0000000..eb82001
--- /dev/null
+++ b/vendor/maennchen/zipstream-php/src/Exception/FileNotFoundException.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+namespace ZipStream\Exception;
+
+use ZipStream\Exception;
+
+/**
+ * This Exception gets invoked if a file wasn't found
+ */
+class FileNotFoundException extends Exception
+{
+ /**
+ * Constructor of the Exception
+ *
+ * @param String $path - The path which wasn't found
+ */
+ public function __construct(string $path)
+ {
+ parent::__construct("The file with the path $path wasn't found.");
+ }
+}
diff --git a/vendor/maennchen/zipstream-php/src/Exception/FileNotReadableException.php b/vendor/maennchen/zipstream-php/src/Exception/FileNotReadableException.php
new file mode 100644
index 0000000..1fbfdc5
--- /dev/null
+++ b/vendor/maennchen/zipstream-php/src/Exception/FileNotReadableException.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+namespace ZipStream\Exception;
+
+use ZipStream\Exception;
+
+/**
+ * This Exception gets invoked if a file wasn't found
+ */
+class FileNotReadableException extends Exception
+{
+ /**
+ * Constructor of the Exception
+ *
+ * @param String $path - The path which wasn't found
+ */
+ public function __construct(string $path)
+ {
+ parent::__construct("The file with the path $path isn't readable.");
+ }
+}
diff --git a/vendor/maennchen/zipstream-php/src/Exception/IncompatibleOptionsException.php b/vendor/maennchen/zipstream-php/src/Exception/IncompatibleOptionsException.php
new file mode 100644
index 0000000..2f1a7ef
--- /dev/null
+++ b/vendor/maennchen/zipstream-php/src/Exception/IncompatibleOptionsException.php
@@ -0,0 +1,14 @@
+<?php
+
+declare(strict_types=1);
+
+namespace ZipStream\Exception;
+
+use ZipStream\Exception;
+
+/**
+ * This Exception gets invoked if options are incompatible
+ */
+class IncompatibleOptionsException extends Exception
+{
+}
diff --git a/vendor/maennchen/zipstream-php/src/Exception/OverflowException.php b/vendor/maennchen/zipstream-php/src/Exception/OverflowException.php
new file mode 100644
index 0000000..a1bc4d0
--- /dev/null
+++ b/vendor/maennchen/zipstream-php/src/Exception/OverflowException.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace ZipStream\Exception;
+
+use ZipStream\Exception;
+
+/**
+ * This Exception gets invoked if a counter value exceeds storage size
+ */
+class OverflowException extends Exception
+{
+ public function __construct()
+ {
+ parent::__construct('File size exceeds limit of 32 bit integer. Please enable "zip64" option.');
+ }
+}
diff --git a/vendor/maennchen/zipstream-php/src/Exception/StreamNotReadableException.php b/vendor/maennchen/zipstream-php/src/Exception/StreamNotReadableException.php
new file mode 100644
index 0000000..e676e37
--- /dev/null
+++ b/vendor/maennchen/zipstream-php/src/Exception/StreamNotReadableException.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+namespace ZipStream\Exception;
+
+use ZipStream\Exception;
+
+/**
+ * This Exception gets invoked if `fread` fails on a stream.
+ */
+class StreamNotReadableException extends Exception
+{
+ /**
+ * Constructor of the Exception
+ *
+ * @param string $fileName - The name of the file which the stream belongs to.
+ */
+ public function __construct(string $fileName)
+ {
+ parent::__construct("The stream for $fileName could not be read.");
+ }
+}