]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/stacker/file/fifo/class_FiFoFileStack.php
Refacuring / possible WIP:
[core.git] / framework / main / classes / stacker / file / fifo / class_FiFoFileStack.php
index 42eab523b6cab53796820dad5f15eb6a0ffcba60..16a5f263d783ae5502b99b0eebb0c10a1e12cb8e 100644 (file)
@@ -10,6 +10,7 @@ use Org\Mxchange\CoreFramework\Stack\File\StackableFile;
 
 // Import SPL stuff
 use \InvalidArgumentException;
+use \OutOfBoundsException;
 use \SplFileInfo;
 
 /**
@@ -162,14 +163,14 @@ class FiFoFileStack extends BaseFileStack implements StackableFile, Calculatable
         * @param       $seekPosition   Seek position in file
         * @param       $whence                 Added to offset (default: only use offset to seek to)
         * @return      $status                 Status of this operation
-        * @throws      InvalidArgumentException        If a parameter is invalid
+        * @throws      OutOfBoundsException    If the position is not seekable
         */
        public function seek (int $seekPosition, int $whence = SEEK_SET) {
                // Validate parameter
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FIFO-FILE-STACK: seekPosition=%d,whence=%d - CALLED!', $seekPosition, $whence));
                if ($seekPosition < 0) {
                        // Invalid seek position
-                       throw new InvalidArgumentException(sprintf('seekPosition=%d is not valid', $seekPosition));
+                       throw new OutOfBoundsException(sprintf('seekPosition=%d is not valid', $seekPosition));
                }
 
                // @TODO Unfinished method or invoke inner iterator's method?