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

CheckException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 14
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 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