Open Avtonom opened 7 years ago
$sender = new \SmsSender\SmsSender(); try { $sendResult = $sender->send('0642424242', 'It\'s the answer.', 'Kévin'); } catch(\SmsSender\Exception\WrappedException $e){ if($e->getWrappedException() && $e->getWrappedException() instanceof \SmsSender\Exception\AdapterException){ $smsException = new \Exception($e->getWrappedException()->getMessage(), $e->getWrappedException()->getCode(), $e); if($e->getWrappedException()->getData()){ var_dump($e->getWrappedException()->getData()); // request data } } throw $smsException; }