Completed
Pull Request — stable9 (#47)
by Olivier
08:29
created

CheckException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
3
/**
4
 * ownCloud - galleryplus
5
 *
6
 * This file is licensed under the Affero General Public License version 3 or
7
 * later. See the COPYING file.
8
 *
9
 * @author Olivier Paroz <[email protected]>
10
 *
11
 * @copyright Olivier Paroz 2014-2015
12
 */
13
14
namespace OCA\GalleryPlus\Middleware;
15
16
use OCP\Util;
17
18
/**
19
 * Thrown when one of the tests in the "check" middlewares fails
20
 *
21
 * @package OCA\GalleryPlus\Middleware
22
 */
23
class CheckException extends \Exception {
24
25
	/**
26
	 * Constructor
27
	 *
28
	 * @param string $msg the message contained in the exception
29
	 * @param int $code the HTTP status code
30
	 */
31 19
	public function __construct($msg, $code = 0) {
32 19
		Util::writeLog('galleryplus', 'Exception: ' . $msg . ' (' . $code . ')', Util::ERROR);
33 19
		parent::__construct($msg, $code);
34 19
	}
35
36
}
37