lonnieezell / Bonfire

Jumpstart your CodeIgniter web applications with a modular, HMVC-ready, backend.
http://cibonfire.com
1.39k stars 524 forks source link

Broken Exception Handling #1306

Open cosmomathieu opened 6 years ago

cosmomathieu commented 6 years ago

Exception error handling is not working. When an exception error is thrown Bonfire throw it's own and never show you what the initial error is. It looks like the exception error handling is broken.

A PHP Error was encountered
Severity: Error

Message: Uncaught TypeError: Argument 1 passed to CI_Exceptions::show_exception() must be an instance of Exception, instance of Error given, called in /app/bonfire/ci3/core/Common.php on line 676 and defined in /app/bonfire/ci3/core/Exceptions.php:190 Stack trace: #0 /app/bonfire/ci3/core/Common.php(676): CI_Exceptions->show_exception(Object(Error)) #1 [internal function]: _exception_handler(Object(Error)) #2 {main} thrown

Filename: core/Exceptions.php

Line Number: 190

Backtrace:
cosmomathieu commented 6 years ago

I tried upgrading to CI 3.1.9 but encountered a different error Route class not found in config.php. I ended up fixing this issue by modifying the Exception class under bonfire/ci3/core/Exception.php with the information mentioned here https://stackoverflow.com/questions/36982769/codeigniter-ci-exceptionsshow-exception-error-after-updating-to-php-7#.