diff options
author | Robin Appelman <robin@icewind.nl> | 2018-07-03 14:56:37 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2018-07-03 18:12:31 +0200 |
commit | 6d68d34f2f9fed526c6e48529e081b662e78cce4 (patch) | |
tree | b31ecd3afe4d92ce6a79738cb96f72acda4ce264 /apps/files_external/lib | |
parent | d1df33a19067c02d86e3cafedd78ac4561dc673b (diff) | |
download | nextcloud-server-6d68d34f2f9fed526c6e48529e081b662e78cce4.tar.gz nextcloud-server-6d68d34f2f9fed526c6e48529e081b662e78cce4.zip |
Improved logging of smb connection errors
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SMB.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index c9828606ffb..8fa654ffbbf 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -139,6 +139,7 @@ class SMB extends Common implements INotifyStorage { } return $this->statCache[$path]; } catch (ConnectException $e) { + \OC::$server->getLogger()->logException($e, ['message' => 'Error while getting file info']); throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); } } @@ -165,6 +166,7 @@ class SMB extends Common implements INotifyStorage { } }); } catch (ConnectException $e) { + \OC::$server->getLogger()->logException($e, ['message' => 'Error while getting folder content']); throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); } } @@ -289,6 +291,7 @@ class SMB extends Common implements INotifyStorage { } catch (ForbiddenException $e) { return false; } catch (ConnectException $e) { + \OC::$server->getLogger()->logException($e, ['message' => 'Error while deleting file']); throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); } } @@ -373,6 +376,7 @@ class SMB extends Common implements INotifyStorage { } catch (ForbiddenException $e) { return false; } catch (ConnectException $e) { + \OC::$server->getLogger()->logException($e, ['message' => 'Error while opening file']); throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); } } @@ -399,6 +403,7 @@ class SMB extends Common implements INotifyStorage { } catch (ForbiddenException $e) { return false; } catch (ConnectException $e) { + \OC::$server->getLogger()->logException($e, ['message' => 'Error while removing folder']); throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); } } @@ -412,6 +417,7 @@ class SMB extends Common implements INotifyStorage { } return false; } catch (ConnectException $e) { + \OC::$server->getLogger()->logException($e, ['message' => 'Error while creating file']); throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); } } @@ -447,6 +453,7 @@ class SMB extends Common implements INotifyStorage { $this->share->mkdir($path); return true; } catch (ConnectException $e) { + \OC::$server->getLogger()->logException($e, ['message' => 'Error while creating folder']); throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); } catch (Exception $e) { return false; @@ -520,6 +527,7 @@ class SMB extends Common implements INotifyStorage { try { return parent::test(); } catch (Exception $e) { + \OC::$server->getLogger()->logException($e); return false; } } |