diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-04-01 17:12:28 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-04-22 11:34:14 +0200 |
commit | a2cc658f376aaf26a9cec63197722660129ba4d6 (patch) | |
tree | ebe36e83aec1f30ab88072b480f5082299e3b3ea /lib | |
parent | f830150acc3d4788805377f0c6fcdce9f024148b (diff) | |
download | nextcloud-server-a2cc658f376aaf26a9cec63197722660129ba4d6.tar.gz nextcloud-server-a2cc658f376aaf26a9cec63197722660129ba4d6.zip |
throw exception if setup is incomplete
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/hook.php | 3 | ||||
-rw-r--r-- | lib/private/servernotavailableexception.php | 27 |
2 files changed, 30 insertions, 0 deletions
diff --git a/lib/private/hook.php b/lib/private/hook.php index c9ca58f779e..7c7128646a9 100644 --- a/lib/private/hook.php +++ b/lib/private/hook.php @@ -80,6 +80,9 @@ class OC_Hook{ OC_Log::write('hook', 'error while running hook (' . $i["class"] . '::' . $i["name"] . '): '.$e->getMessage(), OC_Log::ERROR); + if($e instanceof \OC\ServerNotAvailableException && $signalclass === 'OC_Filesystem' && $signalname === 'setup') { + throw $e; + } } } diff --git a/lib/private/servernotavailableexception.php b/lib/private/servernotavailableexception.php new file mode 100644 index 00000000000..5a57917d23a --- /dev/null +++ b/lib/private/servernotavailableexception.php @@ -0,0 +1,27 @@ +<?php +/** + * @author Morris Jobke <hey@morrisjobke.de> + * + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + +namespace OC; + + +class ServerNotAvailableException extends \Exception { + +} |