How im supposed to catch exceptions?
Closed this issue · 2 comments
alejandrotrevi commented
Im doing this:
try {
Nexmo::message()->send([
'to' => $user->getPhoneWithCode(),
'from' => '16105552344',
'text' => 'CMM te saluda '. $user->name . ', tu numero de socio es: ' . $user->credential . ''
]);
} catch (Exception $e) {
Log::error('Nexmo error:' . $e->getMessage());
}
but i still get the exception in the browser.
tjlytle commented
If that code is already in a namespace, you'll have to add a slash so it's \Exception
.
alejandrotrevi commented
Oh, thank you soooo much!!