Changeset View
Changeset View
Standalone View
Standalone View
lib/Kolab/DAV/Node.php
Show First 20 Lines • Show All 200 Lines • ▼ Show 20 Lines | class Node implements \Sabre\DAV\INode | ||||
protected function throw_exception($e) | protected function throw_exception($e) | ||||
{ | { | ||||
$error = $e->getCode(); | $error = $e->getCode(); | ||||
$msg = $e->getMessage(); | $msg = $e->getMessage(); | ||||
if ($error == \file_storage::ERROR_UNAVAILABLE) { | if ($error == \file_storage::ERROR_UNAVAILABLE) { | ||||
throw new \Sabre\DAV\Exception\ServiceUnavailable($msg); | throw new \Sabre\DAV\Exception\ServiceUnavailable($msg); | ||||
} | } | ||||
else if ($error == \kolab_storage::ERROR_FORBIDDEN) { | else if ($error == \file_storage::ERROR_FORBIDDEN) { | ||||
throw new \Sabre\DAV\Exception\Forbidden($msg); | throw new \Sabre\DAV\Exception\Forbidden($msg); | ||||
} | } | ||||
throw new \Sabre\DAV\Exception($msg); | throw new \Sabre\DAV\Exception($msg); | ||||
} | } | ||||
} | } |