DataSourceException::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 2
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace frictionlessdata\tableschema\Exceptions;
4
5
/**
6
 * this exception should be raised from DataSourceInterface classes
7
 * it will usually represent some kind of file system error in reading
8
 * or an error in matching value to a column.
9
 */
10
class DataSourceException extends \Exception
11
{
12
    public function __construct($message, $rowNum = 0)
13
    {
14
        if (!empty($rowNum)) {
15
            $message = "row {$rowNum}: {$message}";
16
        }
17
        parent::__construct($message);
18
    }
19
}
20