use CoreFramework\Generic\NullPointerException;
// Import SPL stuff
+use \InvalidArgumentException;
use \SplFileInfo;
/**
*
* @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