Passed
Push — master ( a9b7a7...f17f1a )
by Pauli
02:14
created

UniqueConstraintViolationException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 2
rs 10
1
<?php declare(strict_types=1);
2
3
/**
4
 * ownCloud - Music app
5
 *
6
 * This file is licensed under the Affero General Public License version 3 or
7
 * later. See the COPYING file.
8
 *
9
 * @author Pauli Järvinen <[email protected]>
10
 * @copyright Pauli Järvinen 2021
11
 */
12
13
namespace OCA\Music\AppFramework\Db;
14
15
/**
16
 * Own exception type for the Music app to be used on DB unique constraint violations.
17
 * The exceptions used for this by the core vary by the version of Nexcloud or ownCloud used.
18
 * Mapping these all to a common type enables unified handling.
19
 */
20
class UniqueConstraintViolationException extends \Exception {
21
22
	/**
23
	 * Constructor
24
	 * @param string $msg the error message
25
	 */
26
	public function __construct(string $message = "", int $code = 0, \Throwable $previous = null) {
27
		parent::__construct($message, $code, $previous);
28
	}
29
}
30