src/Exception/Parser/AbstractParserError.php 1 location
|
@@ 14-31 (lines=18) @@
|
11 |
|
use Youshido\GraphQL\Exception\Interfaces\LocationableExceptionInterface; |
12 |
|
use Youshido\GraphQL\Parser\Location; |
13 |
|
|
14 |
|
abstract class AbstractParserError extends \Exception implements LocationableExceptionInterface |
15 |
|
{ |
16 |
|
|
17 |
|
/** @var Location */ |
18 |
|
private $location; |
19 |
|
|
20 |
|
public function __construct($message, Location $location) |
21 |
|
{ |
22 |
|
parent::__construct($message); |
23 |
|
|
24 |
|
$this->location = $location; |
25 |
|
} |
26 |
|
|
27 |
|
public function getLocation() |
28 |
|
{ |
29 |
|
return $this->location; |
30 |
|
} |
31 |
|
} |
32 |
|
|
src/Exception/ResolveException.php 1 location
|
@@ 14-35 (lines=22) @@
|
11 |
|
use Youshido\GraphQL\Exception\Interfaces\LocationableExceptionInterface; |
12 |
|
use Youshido\GraphQL\Parser\Location; |
13 |
|
|
14 |
|
class ResolveException extends \Exception implements LocationableExceptionInterface |
15 |
|
{ |
16 |
|
|
17 |
|
/** @var Location */ |
18 |
|
private $location; |
19 |
|
|
20 |
|
public function __construct($message, Location $location = null) |
21 |
|
{ |
22 |
|
parent::__construct($message); |
23 |
|
|
24 |
|
$this->location = $location; |
25 |
|
} |
26 |
|
|
27 |
|
|
28 |
|
/** |
29 |
|
* @return Location |
30 |
|
*/ |
31 |
|
public function getLocation() |
32 |
|
{ |
33 |
|
return $this->location; |
34 |
|
} |
35 |
|
} |
36 |
|
|