Skip to content

Commit

Permalink
Catch when station is not found.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Aug 13, 2016
1 parent f2d0539 commit 9b571f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions horde/lib/Block/Weather.php
Expand Up @@ -150,6 +150,8 @@ protected function _content()
$view->location = $this->_weather->searchLocations($location);
} catch (Horde_Service_Weather_Exception $e) {
return $e->getMessage();
} catch (Horde_Exception_NotFound $e) {
return _(sprintf("Location %s not found."), $location);
}
try {
$view->forecast = $this->_weather->getForecast($view->location->code, $this->_params['days']);
Expand Down

0 comments on commit 9b571f2

Please sign in to comment.