Improvement of Exception info in File manipulation.#19558
Improvement of Exception info in File manipulation.#19558dgedgedge wants to merge 1 commit intonextcloud:masterfrom dgedgedge:master
Conversation
Improvement of Exception through. Not tested. I do not have the mead. Signed-off-by: Denis Germa <denis.germa@free.fr>
kesselb
left a comment
There was a problem hiding this comment.
Thanks 👍 It's a good idea to add more details to those exceptions. But the current state adds more confusion from my pov.
| return $this->view->file_get_contents($this->path); | ||
| } else { | ||
| throw new NotPermittedException(); | ||
| throw new NotPermittedException('Permission issue unable to get content of file ' . $this->path); |
There was a problem hiding this comment.
Permission issue unable to get content of file
I don't think so. We don't have permission to read the file.
| $this->sendHooks(array('postWrite')); | ||
| } else { | ||
| throw new NotPermittedException(); | ||
| throw new NotPermittedException('Permission issue unable to get content of file ' . $this->path); |
There was a problem hiding this comment.
We don't have permission to update a file here. Unable to get content of file is not correct.
| return $result; | ||
| } else { | ||
| throw new NotPermittedException(); | ||
| throw new NotPermittedException('Permission issue Could not open (Incorrect mode ' . $mode . ') ' . $this->path); |
There was a problem hiding this comment.
The mode is not incorrect. We don't have the required permissions to do that operation. Example: w+ requires us to have read and update permission for a file.
|
Base repository was deleted. And there was no feedback since a while. Thus I will close this PR for now. It can be picked up later of course. |
Improvement of Exception through.
Not tested. I do not have the mean.
I did this to help debug an issue with nextcloud/Music application.
It hanged while scanning files.
Signed-off-by: Denis Germa denis.germa@free.fr