@@ -21,6 +21,8 @@ namespace app\exceptions\factory;
2121use Throwable;
2222use Exception;
2323use app\config\ApplicationConfig;
24+ use NGFramer\NGFramerPHPExceptions\Render;
25+ use NGFramer\NGFramerPHPExceptions\exceptions\_BaseError;
2426use NGFramer\NGFramerPHPExceptions\renderer\supportive\_BaseRenderer;
2527
2628class RendererFactory
@@ -53,7 +55,7 @@ class RendererFactory
5355 // Use this snippet of code to use your own renderer.
5456 // $renderer = $this->create();
5557 // Use this snippet of code to use the default renderer.
56- $renderer = \NGFramer\NGFramerPHPExceptions\ Render::create();
58+ $renderer = Render::create();
5759
5860 // This will be applicable to both the default and custom renderer.
5961 $renderer->render($exception);
@@ -64,7 +66,7 @@ class RendererFactory
6466 */
6567 public function register(): void
6668 {
67- set_error_handler([$this , 'convertToException']);
69+ set_error_handler([(new _BaseError()) , 'convertToException']);
6870 set_exception_handler([$this, 'globalHandler']);
6971 }
7072
@@ -117,4 +119,4 @@ $renderFactory->register();
117119
118120## 4. Customizing and updating
119121Feel free to customize and update the renderer as per your requirements.
120- Use appropriate name spaces and directories for the management of the engine.
122+ Use appropriate name spaces and directories for the management of the engine.
0 commit comments