server/lib/private/connector/sabre/exception/filelocked.php
Thomas Müller 76e04027bc Upgrade SabreDAV to 1.8.10
Updating SabreDAV namespaces
2014-06-04 12:22:23 +02:00

28 lines
619 B
PHP

<?php
/**
* ownCloud
*
* @author Owen Winkler
* @copyright 2013 Owen Winkler <owen@owncloud.com>
*
*/
class OC_Connector_Sabre_Exception_FileLocked extends \Sabre\DAV\Exception {
public function __construct($message = "", $code = 0, Exception $previous = null) {
if($previous instanceof \OCP\Files\LockNotAcquiredException) {
$message = sprintf('Target file %s is locked by another process.', $previous->path);
}
parent::__construct($message, $code, $previous);
}
/**
* Returns the HTTP status code for this exception
*
* @return int
*/
public function getHTTPCode() {
return 503;
}
}