2015-08-07 17:04:27 +03:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Copyright (c) 2015 Robin Appelman <icewind@owncloud.com>
|
|
|
|
* This file is licensed under the Affero General Public License version 3 or
|
|
|
|
* later.
|
|
|
|
* See the COPYING-README file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Test\Connector\Sabre\RequestTest;
|
|
|
|
|
|
|
|
use Sabre\DAV\Exception;
|
|
|
|
|
2015-08-30 20:13:01 +03:00
|
|
|
class ExceptionPlugin extends \OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin {
|
2015-08-07 17:04:27 +03:00
|
|
|
/**
|
|
|
|
* @var \Exception[]
|
|
|
|
*/
|
|
|
|
protected $exceptions = [];
|
|
|
|
|
|
|
|
public function logException(\Exception $ex) {
|
|
|
|
$exceptionClass = get_class($ex);
|
|
|
|
if (!isset($this->nonFatalExceptions[$exceptionClass])) {
|
|
|
|
$this->exceptions[] = $ex;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return \Exception[]
|
|
|
|
*/
|
|
|
|
public function getExceptions() {
|
|
|
|
return $this->exceptions;
|
|
|
|
}
|
|
|
|
}
|