DataSourceException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

1 Method

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