Closed ntvsx193 closed 10 years ago
Hello! I have class Router with __contructor(); My app build:
core.php
Server::create(API_URL, new Router) ->setDebugMode(DEBUG) ->collectRoutes() ->run();
router.php
class Router { function __construct(){ DB::initialize(); Transl::initialize(); $this->user = new User(); .... }
If i give exeption in DB or User (contructer's) result to api view as:
Fatal error: Uncaught exception 'App\ExDB' with message 'EXEC_QUERY' in
ie I'm don't have wrapper error as:
{ "status": 500, "error": "App\\ExDB", "message": "EXEC_QUERY", "file": "[file]", "line": [number], "trace": .... }
What do you think about this?
Hm.... Solution is found!
Server::create(API_URL, 'App\Router') ->setDebugMode(DEBUG) ->collectRoutes() ->run();
So, issue settled? :)
Yes)
Hello! I have class Router with __contructor(); My app build:
core.php
router.php
If i give exeption in DB or User (contructer's) result to api view as:
ie I'm don't have wrapper error as:
What do you think about this?