mirror of
https://github.com/kanaka/mal.git
synced 2024-09-20 01:57:09 +03:00
Rename mal's Error class to _Error
This commit is contained in:
parent
6e8730c4eb
commit
df2cc0c51c
@ -6,7 +6,7 @@ require_once 'reader.php';
|
||||
require_once 'printer.php';
|
||||
|
||||
// Error/Exception functions
|
||||
function mal_throw($obj) { throw new Error($obj); }
|
||||
function mal_throw($obj) { throw new _Error($obj); }
|
||||
|
||||
|
||||
// String functions
|
||||
|
@ -119,7 +119,7 @@ function MAL_EVAL($ast, $env) {
|
||||
if ($a2[0]->value === "catch*") {
|
||||
try {
|
||||
return MAL_EVAL($a1, $env);
|
||||
} catch (Error $e) {
|
||||
} catch (_Error $e) {
|
||||
$catch_env = new Env($env, array($a2[1]),
|
||||
array($e->obj));
|
||||
return MAL_EVAL($a2[2], $catch_env);
|
||||
|
@ -124,7 +124,7 @@ function MAL_EVAL($ast, $env) {
|
||||
if ($a2[0]->value === "catch*") {
|
||||
try {
|
||||
return MAL_EVAL($a1, $env);
|
||||
} catch (Error $e) {
|
||||
} catch (_Error $e) {
|
||||
$catch_env = new Env($env, array($a2[1]),
|
||||
array($e->obj));
|
||||
return MAL_EVAL($a2[2], $catch_env);
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
// Errors/Exceptions
|
||||
class Error extends Exception {
|
||||
class _Error extends Exception {
|
||||
public $obj = null;
|
||||
public function __construct($obj) {
|
||||
parent::__construct("Mal Error", 0, null);
|
||||
|
Loading…
Reference in New Issue
Block a user