надеюсь, вы поможете мне с этой странной проблемой: я пытаюсь перенаправить из контроллера, но Кохана продолжает выдавать исключение, и я просто не могу понять, почему:
код в Cadastro.php:
try{
$this->redirect('/dados', 302);
} catch (Exception $e) {
$this->response->body(Json_View::factory(array("line ".$e->getLine()." of file ".$e->getFile().":".$e->getMessage()." - trace as string: ".$e->getTraceAsString())));
} }
сообщение трассировки стека, возвращаемое исключением в приведенном выше коде:
#0 C:\\xampp\\htdocs\\grademagica\\system\\classes\\Kohana\\HTTP.php(33): Kohana_HTTP_Exception::factory(302)
#1 C:\\xampp\\htdocs\\grademagica\\system\\classes\\Kohana\\Controller.php(127): Kohana_HTTP::redirect('\/dados', 302)
#2 C:\\xampp\\htdocs\\grademagica\\modules\\grademagica\\classes\\Controller\\Cadastro.php(123): Kohana_Controller::redirect('\/dados', 302)
#3 C:\\xampp\\htdocs\\grademagica\\system\\classes\\Kohana\\Controller.php(84): Controller_Cadastro->action_signin()
#4 [internal function]: Kohana_Controller->execute()
#5 C:\\xampp\\htdocs\\grademagica\\system\\classes\\Kohana\\Request\\Client\\Internal.php(97): ReflectionMethod->invoke(Object(Controller_Cadastro))
#6 C:\\xampp\\htdocs\\grademagica\\system\\classes\\Kohana\\Request\\Client.php(114): Kohana_Request_Client_Internal->execute_request(Object(Request), Object(Response))
#7 C:\\xampp\\htdocs\\grademagica\\system\\classes\\Kohana\\Request.php(990): Kohana_Request_Client->execute(Object(Request))
#8 C:\\xampp\\htdocs\\grademagica\\index.php(123): Kohana_Request->execute()
#9 {main}
Строка 123 в Cadastro.php — это «$this->redirect('/dados', 302);», как описано выше. Кто-нибудь может помочь мне показать, что я делаю неправильно? Я следую точным указаниям документации.
Спасибо