]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/stacker/file/class_BaseFileStack.php
Continued:
[core.git] / framework / main / classes / stacker / file / class_BaseFileStack.php
index 573403dd27506e14ea7417735dea00fdbd82d239..303caca77c7666d0f91e05b18640b50d3c199cc7 100644 (file)
@@ -95,7 +95,7 @@ abstract class BaseFileStack extends BaseStacker {
                                strlen($data),
                                $data,
                                $this->getIteratorInstance()->getBinaryFileInstance()->getHeaderSize()
-                       ));
+                       ), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                } elseif (empty(trim($data, chr(0)))) {
                        // Empty header, file is freshly pre-allocated
                        /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-FILE-STACK: Empty file header detected - EXIT!');
@@ -109,7 +109,7 @@ abstract class BaseFileStack extends BaseStacker {
                        throw new UnexpectedValueException(sprintf('data=%s does not have separator=0x%s at the end.',
                                $data,
                                dechex(BinaryFile::SEPARATOR_HEADER_ENTRIES)
-                       ));
+                       ), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                }
 
                // Okay, then remove it
@@ -145,7 +145,7 @@ abstract class BaseFileStack extends BaseStacker {
                                $data,
                                count($header),
                                BinaryFile::HEADER_STACK_ELEMENT_COUNT
-                       ));
+                       ), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                } elseif ($header[BinaryFile::HEADER_NAME_MAGIC] != StackableFile::STACK_MAGIC) {
                        // Bad magic
                        throw new InvalidMagicException($data, self::EXCEPTION_BAD_MAGIC);
@@ -156,7 +156,7 @@ abstract class BaseFileStack extends BaseStacker {
                                strlen($header[BinaryFile::HEADER_NAME_TOTAL_ENTRIES]),
                                $header[BinaryFile::HEADER_NAME_TOTAL_ENTRIES],
                                BinaryFile::LENGTH_COUNT
-                       ));
+                       ), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                } elseif (strlen($header[BinaryFile::HEADER_NAME_SEEK_POSITION]) != BinaryFile::LENGTH_POSITION) {
                        // Position length not valid
                        throw new UnexpectedValueException(sprintf('header[%s](%d)=%s is not expected %d length',
@@ -164,7 +164,7 @@ abstract class BaseFileStack extends BaseStacker {
                                strlen($header[BinaryFile::HEADER_NAME_SEEK_POSITION]),
                                $header[BinaryFile::HEADER_NAME_SEEK_POSITION],
                                BinaryFile::LENGTH_POSITION
-                       ));
+                       ), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                }
 
                // Decode count and seek position
@@ -745,7 +745,7 @@ abstract class BaseFileStack extends BaseStacker {
                                gettype($gapPosition),
                                $gapPosition,
                                $this->getIteratorInstance()->getBinaryFileInstance()->getHeaderSize()
-                       ));
+                       ), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
                }
 
                // Then write the data at that gap