catch excepton laravel code example
Example: try and catch laravel
try {
$this->buildXMLHeader();
} catch (\Exception $e) {
return $e->getMessage();
}
try {
$this->buildXMLHeader();
} catch (\Exception $e) {
return $e->getMessage();
}