Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
58 | public function logError(WrappedException $error, $provider_class) |
||
59 | { |
||
60 | if ($this->logger === null) { |
||
61 | return; |
||
62 | } |
||
63 | |||
64 | $realError = $error->getWrappedException(); |
||
65 | $sms = $error->getSms(); |
||
66 | $message = sprintf( |
||
67 | 'Failed to sent SMS to %s, from %s. Error message: "%s", code %d (%s)', |
||
68 | $sms['recipient'], |
||
69 | $sms['originator'], |
||
70 | $realError->getMessage(), |
||
71 | $realError->getCode(), |
||
72 | $provider_class |
||
73 | ); |
||
74 | |||
75 | $this->logger->error($message); |
||
76 | } |
||
77 | |||
86 |