X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Fstacker%2Ffile%2Fclass_BaseFileStack.php;h=303caca77c7666d0f91e05b18640b50d3c199cc7;hb=HEAD;hp=573403dd27506e14ea7417735dea00fdbd82d239;hpb=f861d6bc00f8a3ecf6b057f2aa93129572643896;p=core.git diff --git a/framework/main/classes/stacker/file/class_BaseFileStack.php b/framework/main/classes/stacker/file/class_BaseFileStack.php index 573403dd..303caca7 100644 --- a/framework/main/classes/stacker/file/class_BaseFileStack.php +++ b/framework/main/classes/stacker/file/class_BaseFileStack.php @@ -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