note 124923 deleted from exception.getline by sobak
| From: | sobak@php.net | Date: | Sat, 18 Apr 2020 18:53:21 +0000 |
| Subject: | note 124923 deleted from exception.getline by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-214495@lists.php.net to get a copy of this message | ||
Note Submitter: Festus Ngor
----
Exception::getTraceAsString â Gets the stack trace as a string. So use
$e->getTraceAsString() i.e.:
<?php
try {
throw new Exception("Some error message");
} catch(Exception $e) {
echo "The exception was created from: \n\r" . $e->getTraceAsString();
}
?>