aboutsummaryrefslogtreecommitdiffstats
path: root/Visitor
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2013-06-07 16:42:51 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2013-06-07 16:42:51 +0200
commitdeb81e7b382857c9b155c8122558696a69e045ba (patch)
treed19d4dfa0ec3fd7cc42b526962fc43f3bc938788 /Visitor
parentbfda5d93f406e0253415500fcf9ac252b98442bc (diff)
downloadPraspel-deb81e7b382857c9b155c8122558696a69e045ba.zip
Praspel-deb81e7b382857c9b155c8122558696a69e045ba.tar.gz
Praspel-deb81e7b382857c9b155c8122558696a69e045ba.tar.bz2
New exceptions architecture.
Hoa\Praspel\Exception is now an interface. The root exception is Hoa\Praspel\Exception\Generic. We have also added the “Praspel failure” exceptions and the Hoa\Praspel\Exception\Group exception.
Diffstat (limited to 'Visitor')
-rw-r--r--Visitor/Compiler.php7
-rw-r--r--Visitor/Interpreter.php10
2 files changed, 11 insertions, 6 deletions
diff --git a/Visitor/Compiler.php b/Visitor/Compiler.php
index 246b34a..c14e6a3 100644
--- a/Visitor/Compiler.php
+++ b/Visitor/Compiler.php
@@ -39,6 +39,11 @@ namespace {
from('Hoa')
/**
+ * \Hoa\Praspel\Exception\Compiler
+ */
+-> import('Praspel.Exception.Compiler')
+
+/**
* \Hoa\Visitor\Visit
*/
-> import('Visitor.Visit');
@@ -200,7 +205,7 @@ class Compiler implements \Hoa\Visitor\Visit {
foreach($element as $el)
$out .= $el->accept($this, $handle, $eldnah);
else
- throw new \Hoa\Core\Exception(
+ throw new \Hoa\Praspel\Exception\Compiler(
'%s is not yet implemented.', 0, get_class($element));
return $out;
diff --git a/Visitor/Interpreter.php b/Visitor/Interpreter.php
index 37be4da..f0f6fc3 100644
--- a/Visitor/Interpreter.php
+++ b/Visitor/Interpreter.php
@@ -39,11 +39,6 @@ namespace {
from('Hoa')
/**
- * \Hoa\Visitor\Visit
- */
--> import('Visitor.Visit')
-
-/**
* \Hoa\Praspel\Exception\Interpreter
*/
-> import('Praspel.Exception.Interpreter')
@@ -54,6 +49,11 @@ from('Hoa')
-> import('Praspel.Model.Specification')
/**
+ * \Hoa\Visitor\Visit
+ */
+-> import('Visitor.Visit')
+
+/**
* \Hoa\String
*/
-> import('String.~');