We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is PoC to show the current PageNotFoundException handling is not good.
.env:
.env
CI_ENVIRONMENT = production
--- a/app/Config/Events.php +++ b/app/Config/Events.php @@ -4,6 +4,7 @@ namespace Config; use CodeIgniter\Events\Events; use CodeIgniter\Exceptions\FrameworkException; +use CodeIgniter\Exceptions\PageNotFoundException; /* * -------------------------------------------------------------------- @@ -46,3 +47,7 @@ Events::on('pre_system', static function () { Services::toolbar()->respond(); } }); + +Events::on('pre_system', static function () { + throw new PageNotFoundException('this is raw exception message.'); +});
Navigate to http://localhost:8080/ and you will see:
http://localhost:8080/
404 - File Not Found this is raw exception message.
The text was updated successfully, but these errors were encountered:
kenjis
Successfully merging a pull request may close this issue.
This is PoC to show the current PageNotFoundException handling is not good.
.env
:Navigate to
http://localhost:8080/
and you will see:The text was updated successfully, but these errors were encountered: