Overhaul error handling

This commit is contained in:
Matthew Oslan
2019-06-06 10:46:24 -04:00
parent d95f17950b
commit b44cd4502c
4 changed files with 39 additions and 20 deletions

View File

@@ -90,7 +90,7 @@ export interface WeatherProvider {
* Retrieves weather data necessary for watering level calculations.
* @param coordinates The coordinates to retrieve the watering data for.
* @return A Promise that will be resolved with the WateringData if it is successfully retrieved,
* or resolved with undefined if an error occurs while retrieving the WateringData.
* or rejected with an error message if an error occurs while retrieving the WateringData.
*/
getWateringData?( coordinates : GeoCoordinates ): Promise< WateringData >;
@@ -98,7 +98,7 @@ export interface WeatherProvider {
* Retrieves the current weather data for usage in the mobile app.
* @param coordinates The coordinates to retrieve the weather for
* @return A Promise that will be resolved with the WeatherData if it is successfully retrieved,
* or resolved with undefined if an error occurs while retrieving the WeatherData.
* or rejected with an error message if an error occurs while retrieving the WeatherData.
*/
getWeatherData?( coordinates : GeoCoordinates ): Promise< WeatherData >;
}