Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
In any PHP application you can just do:
$e = new \Exception(); echo '<pre>'; print_r($e->getTraceAsString()); exit;
Due to name spacing in M2, you need to use new \Exception(); instead of just new Exception();
new \Exception();
new Exception();
$e = new \Exception(); print_r($e->getTraceAsString()); exit;
Due to name spacing in M2, you need to use new \Exception();new \Exception(); instead of just new Exception();new Exception();
$e = new Exception\Exception(); print_r($e->getTraceAsString()); exit;
$e = new Exception(); print_r($e->getTraceAsString()); exit;