Renamed Registry -> GenericRegistry to make it clear that this registry does
[core.git] / framework / main / classes / file_directories / output / raw / class_FrameworkRawFileOutputPointer.php
index a63535c69616164b422eb34c3f927c540f98b705..81bd343370059b3113137b50a7e1c59bba184041 100644 (file)
@@ -1,13 +1,14 @@
 <?php
 // Own namespace
-namespace CoreFramework\Filesystem\Pointer\Output;
+namespace Org\Mxchange\CoreFramework\Filesystem\Pointer\Output;
 
 // Import framework stuff
-use CoreFramework\FileSystem\BaseFileIo;
-use CoreFramework\Filesystem\Pointer\OutputPointer;
-use CoreFramework\Generic\NullPointerException;
+use Org\Mxchange\CoreFramework\FileSystem\BaseFileIo;
+use Org\Mxchange\CoreFramework\Filesystem\Pointer\OutputPointer;
+use Org\Mxchange\CoreFramework\Generic\NullPointerException;
 
 // Import SPL stuff
+use \InvalidArgumentException;
 use \SplFileInfo;
 
 /**
@@ -49,22 +50,22 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer
         *
         * @param       $infoInstance   An instance of a SplFileInfo class
         * @param       $mode           The output mode ('w', 'a' are valid)
-        * @throws      FileIsEmptyException    If the provided file name is empty.
+        * @throws      InvalidArgumentException        If parameter mode is empty
         * @throws      FileIoException                 If fopen() returns not a file resource
         * @return      void
         */
        public static final function createFrameworkRawFileOutputPointer (SplFileInfo $infoInstance, $mode) {
                // Some pre-sanity checks...
-               if (is_null($infoInstance)) {
+               if (is_null($mode)) {
                        // No infoInstance given
-                       throw new FileIsEmptyException(NULL, self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
+                       throw new InvalidArgumentException('Parameter "mode" is empty');
                } // END - if
 
                // Try to open a handler
                $fileObject = $infoInstance->openFile($mode);
                if ((is_null($fileObject)) || ($fileObject === false)) {
                        // Something bad happend
-                       throw new FileIoException ($infoInstance, self::EXCEPTION_FILE_POINTER_INVALID);
+                       throw new FileIoException($infoInstance, self::EXCEPTION_FILE_POINTER_INVALID);
                } // END - if
 
                // Create new instance