diff options
author | zotlabs <mike@macgirvin.com> | 2017-12-06 14:29:36 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-12-06 14:29:36 -0800 |
commit | e5653945d35e00ae1821fa93e502cc4555519735 (patch) | |
tree | 05c1a273a378ccf02bc19cfb32c8f5be7391abff /Zotlabs/Module/Cloud.php | |
parent | 0a55d6d51143acbf1084104d1626c7a4b88e6c15 (diff) | |
parent | a604236d89a843a10af1a87f5e9a5cdac153b3ab (diff) | |
download | volse-hubzilla-e5653945d35e00ae1821fa93e502cc4555519735.tar.gz volse-hubzilla-e5653945d35e00ae1821fa93e502cc4555519735.tar.bz2 volse-hubzilla-e5653945d35e00ae1821fa93e502cc4555519735.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs/Module/Cloud.php')
-rw-r--r-- | Zotlabs/Module/Cloud.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Zotlabs/Module/Cloud.php b/Zotlabs/Module/Cloud.php index 0f7f9c47a..2215507ca 100644 --- a/Zotlabs/Module/Cloud.php +++ b/Zotlabs/Module/Cloud.php @@ -87,6 +87,10 @@ class Cloud extends \Zotlabs\Web\Controller { // $server->addPlugin(new \Zotlabs\Storage\\QuotaPlugin($auth)); + // over-ride the default XML output on thrown exceptions + + $server->on('exception', [ $this, 'DAVException' ]); + // All we need to do now, is to fire up the server $server->exec(); @@ -97,4 +101,24 @@ class Cloud extends \Zotlabs\Web\Controller { killme(); } + + function DAVException($err) { + + if($err instanceof \Sabre\DAV\Exception\NotFound) { + notice( t('Not found') . EOL); + } + elseif($err instanceof \Sabre\DAV\Exception\Forbidden) { + notice( t('Permission denied') . EOL); + } + else { + notice( t('Unknown error') . EOL); + } + + construct_page(); + + killme(); + } + } + + |