Skip to content

Commit c4bb0d6

Browse files
authored
Updated guide for external installation.
1. Updated the convert to exception source class. 2. Replaced namespace for namespace with an import.
1 parent f57433a commit c4bb0d6

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

guide.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ namespace app\exceptions\factory;
2121
use Throwable;
2222
use Exception;
2323
use app\config\ApplicationConfig;
24+
use NGFramer\NGFramerPHPExceptions\Render;
25+
use NGFramer\NGFramerPHPExceptions\exceptions\_BaseError;
2426
use NGFramer\NGFramerPHPExceptions\renderer\supportive\_BaseRenderer;
2527

2628
class 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
119121
Feel 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

Comments
 (0)