Issue Bug Closed

#85302ResourceStorage throws wrong exception on folder move between storages

Mathias Brodala 06/18/18, 15:33 updated 10/02/18, 10:44

Description

The method ResourceStorage::moveFolderBetweenStorages() is currently not implemented and it throws a RuntimeException.

However, the ExtendedFileUtility::func_move() method implies that this should be a BadMethodCallException instead:

            catch (\BadMethodCallException $e) {
                $this->writeLog(3, 1, 126, 'The function to move a file between storages is not yet implemented', []);
                $this->addMessageToFlashMessageQueue('FileUtility.TheFunctionToMoveAFileBetweenStoragesIsNotYetImplemented');
            }

Due to this users get a misleading error messages which hints at write permission problems (FileUtility.DirectoryWasNotMovedTo) instead of the dedicated message which informs that this action is not yet implemented (FileUtility.TheFunctionToMoveAFileBetweenStoragesIsNotYetImplemented).

Reviews 2