| @@ 87-100 (lines=14) @@ | ||
| 84 | /** |
|
| 85 | * {@inheritdoc} |
|
| 86 | */ |
|
| 87 | public function latest($sourceName, $currencyCode, $rateType = RateType::MEDIAN, \DateTimeInterface $date = null) |
|
| 88 | { |
|
| 89 | try { |
|
| 90 | return $this->manager->latest($sourceName, $currencyCode, $rateType, $date); |
|
| 91 | } catch (\Exception $e) { |
|
| 92 | $this->logger->error('Unable to fetch latest rate for {currency_code} of type {rate_type} from source {source}.', [ |
|
| 93 | 'currency_code' => $currencyCode, |
|
| 94 | 'rate_type' => $rateType, |
|
| 95 | 'source' => $sourceName, |
|
| 96 | 'exception' => $e, |
|
| 97 | ]); |
|
| 98 | throw $e; |
|
| 99 | } |
|
| 100 | } |
|
| 101 | ||
| 102 | /** |
|
| 103 | * {@inheritdoc} |
|
| @@ 105-118 (lines=14) @@ | ||
| 102 | /** |
|
| 103 | * {@inheritdoc} |
|
| 104 | */ |
|
| 105 | public function today($sourceName, $currencyCode, $rateType = RateType::MEDIAN) |
|
| 106 | { |
|
| 107 | try { |
|
| 108 | return $this->manager->today($sourceName, $currencyCode, $rateType); |
|
| 109 | } catch (\Exception $e) { |
|
| 110 | $this->logger->error('Unable to fetch today\'s rate for {currency_code} of type {rate_type} from source {source}.', [ |
|
| 111 | 'currency_code' => $currencyCode, |
|
| 112 | 'rate_type' => $rateType, |
|
| 113 | 'source' => $sourceName, |
|
| 114 | 'exception' => $e, |
|
| 115 | ]); |
|
| 116 | throw $e; |
|
| 117 | } |
|
| 118 | } |
|
| 119 | ||
| 120 | /** |
|
| 121 | * {@inheritdoc} |
|