diff --git a/config.php b/config.php index b2cd3b6..2110ae9 100644 --- a/config.php +++ b/config.php @@ -32,8 +32,10 @@ spl_autoload_register(function ($class_name) { require_once 'classes/' . $class_name; } elseif (file_exists('models/' . $class_name)) { require_once 'models/' . $class_name; + } else { + throw new Exception(sprintf('Невозможно загрузить класс %s',$class_name)); } - throw new Exception(sprintf('Невозможно загрузить класс %s!',$class_name)); + }); /* === Для нападалок. Сперва комнаты в которых нельзя напасть, потом персонаж на которого нельзя напасть. === */