Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/catchable-exceptions' into dev
- Loading branch information
Showing
26 changed files
with
373 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Mustache.php. | ||
* | ||
* (c) 2013 Justin Hileman | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
/** | ||
* A Mustache Exception interface. | ||
*/ | ||
interface Mustache_Exception | ||
{ | ||
// This space intentionally left blank. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Mustache.php. | ||
* | ||
* (c) 2013 Justin Hileman | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
/** | ||
* Invalid argument exception. | ||
*/ | ||
class Mustache_Exception_InvalidArgumentException extends InvalidArgumentException implements Mustache_Exception | ||
{ | ||
// This space intentionally left blank. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Mustache.php. | ||
* | ||
* (c) 2013 Justin Hileman | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
/** | ||
* Logic exception. | ||
*/ | ||
class Mustache_Exception_LogicException extends LogicException implements Mustache_Exception | ||
{ | ||
// This space intentionally left blank. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Mustache.php. | ||
* | ||
* (c) 2013 Justin Hileman | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
/** | ||
* Runtime exception. | ||
*/ | ||
class Mustache_Exception_RuntimeException extends RuntimeException implements Mustache_Exception | ||
{ | ||
// This space intentionally left blank. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Mustache.php. | ||
* | ||
* (c) 2013 Justin Hileman | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
/** | ||
* Mustache syntax exception. | ||
*/ | ||
class Mustache_Exception_SyntaxException extends LogicException implements Mustache_Exception | ||
{ | ||
protected $token; | ||
|
||
public function __construct($msg, array $token) | ||
{ | ||
$this->token = $token; | ||
parent::__construct($msg); | ||
} | ||
|
||
public function getToken() | ||
{ | ||
return $this->token; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Mustache.php. | ||
* | ||
* (c) 2013 Justin Hileman | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
/** | ||
* Unknown filter exception. | ||
*/ | ||
class Mustache_Exception_UnknownFilterException extends UnexpectedValueException implements Mustache_Exception | ||
{ | ||
protected $filterName; | ||
|
||
public function __construct($filterName) | ||
{ | ||
$this->filterName = $filterName; | ||
parent::__construct(sprintf('Unknown filter: %s', $filterName)); | ||
} | ||
|
||
public function getFilterName() | ||
{ | ||
return $this->filterName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Mustache.php. | ||
* | ||
* (c) 2013 Justin Hileman | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
/** | ||
* Unknown helper exception. | ||
*/ | ||
class Mustache_Exception_UnknownHelperException extends InvalidArgumentException implements Mustache_Exception | ||
{ | ||
protected $helperName; | ||
|
||
public function __construct($helperName) | ||
{ | ||
$this->helperName = $helperName; | ||
parent::__construct(sprintf('Unknown helper: %s', $helperName)); | ||
} | ||
|
||
public function getHelperName() | ||
{ | ||
return $this->helperName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Mustache.php. | ||
* | ||
* (c) 2013 Justin Hileman | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
/** | ||
* Unknown template exception. | ||
*/ | ||
class Mustache_Exception_UnknownTemplateException extends InvalidArgumentException implements Mustache_Exception | ||
{ | ||
protected $templateName; | ||
|
||
public function __construct($templateName) | ||
{ | ||
$this->templateName = $templateName; | ||
parent::__construct(sprintf('Unknown template: %s', $templateName)); | ||
} | ||
|
||
public function getTemplateName() | ||
{ | ||
return $this->templateName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.