Completed
Push — master ( fba866...b10a48 )
by Ori
03:03
created

DataSourceException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 2
1
<?php
2
namespace frictionlessdata\tableschema\Exceptions;
3
4
/**
5
 * this exception should be raised from DataSourceInterface classes
6
 * it will usually represent some kind of file system error in reading
7
 * or an error in matching value to a column
8
 */
9
class DataSourceException extends \Exception
10
{
11
    public function __construct($message, $rowNum=0)
12
    {
13
        if (!empty($rowNum)) $message = "row {$rowNum}: {$message}";
14
        parent::__construct($message);
15
    }
16
}
17