]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php
Refacuring / possible WIP:
[core.git] / framework / main / classes / file_directories / input / text / class_FrameworkTextFileInputPointer.php
index eef4a749e0ce16e1e6f2144f26f0cfbcb5de9858..620b2f31d2d205ad8d96e7c55194deef1e0ecf13 100644 (file)
@@ -117,14 +117,15 @@ class FrameworkTextFileInputPointer extends BaseFileIo implements InputPointer {
         *
         * @param       $bytes  Amount of bytes to read or whole line (only text files)
         * @return      $data   Data read from file
+        * @throws      OutOfBoundsException    If the position is not seekable
         * @throws      NullPointerException    If the file pointer instance is not set by setFileObject()
-        * @throws      InvalidResourceException        If there is no object being set
+        * @throws      LogicException  If $fileObject is not an object
         */
        public function read (int $bytes = 0) {
                // Some sanity checks
                if ($bytes < 0) {
                        // Cannot be below zero
-                       throw new InvalidArgumentException(sprintf('bytes=%d is not valid', $bytes));
+                       throw new OutOfBoundsException(sprintf('bytes=%d is not valid', $bytes));
                } elseif (is_null($this->getFileObject())) {
                        // Pointer not initialized
                        throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);