expand error handling, fix typo in commandref
This commit is contained in:
parent
133f17427f
commit
1dde02d570
@ -811,7 +811,7 @@ sub WeatherAsHtmlD($;$)
|
||||
Beispiele:
|
||||
<pre>
|
||||
define Forecast Weather apikey=987498ghjgf864
|
||||
define MyWeather Weather api=OpenWeatherMapAPI,cachemaxage:600 apikey=09878945fdskv876 location=52.4545,13.4545 interval=3600 language=de
|
||||
define MyWeather Weather API=OpenWeatherMapAPI,cachemaxage:600 apikey=09878945fdskv876 location=52.4545,13.4545 interval=3600 language=de
|
||||
</pre>
|
||||
|
||||
Es folgt die API-spezifische Dokumentation.<p>
|
||||
|
@ -189,6 +189,7 @@ sub _ProcessingRetrieveData($$) {
|
||||
and defined($response)
|
||||
and $response )
|
||||
{
|
||||
if ( $response =~ m/^{.*}$/ ) {
|
||||
my $data = eval { decode_json($response) };
|
||||
|
||||
if ($@) {
|
||||
@ -483,6 +484,8 @@ sub _ProcessingRetrieveData($$) {
|
||||
}
|
||||
}
|
||||
}
|
||||
else { _ErrorHandling( $self, 'DarkSky Weather ' . $response ); }
|
||||
}
|
||||
|
||||
## Aufruf der callbackFn
|
||||
_CallWeatherCallbackFn($self);
|
||||
|
@ -243,6 +243,7 @@ sub _ProcessingRetrieveData($$) {
|
||||
and defined($response)
|
||||
and $response )
|
||||
{
|
||||
if ( $response =~ m/^{.*}$/ ) {
|
||||
my $data = eval { decode_json($response) };
|
||||
|
||||
if ($@) {
|
||||
@ -438,6 +439,8 @@ sub _ProcessingRetrieveData($$) {
|
||||
}
|
||||
}
|
||||
}
|
||||
else { _ErrorHandling( $self, 'OpenWeatherMap ' . $response ); }
|
||||
}
|
||||
|
||||
$self->{endpoint} = 'none' if ( $self->{endpoint} eq 'forecast' );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user