Skip to content

Commit

Permalink
#14 Add JsonSyntaxException to definition of processUpdate in BoschTw…
Browse files Browse the repository at this point in the history
…inguardHandler

Signed-off-by: Christian Oeing <[email protected]>
Signed-off-by: Gerd Zanker <[email protected]>
  • Loading branch information
coeing authored and GerdZanker committed Jan 7, 2021
1 parent 5467e05 commit ee0528b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.openhab.core.types.RefreshType;

import com.google.gson.JsonElement;
import com.google.gson.JsonSyntaxException;

/**
* The {@link BoschSHCHandler} is responsible for handling commands for the TwinGuard handler.
Expand Down Expand Up @@ -76,7 +77,7 @@ void updateAirQualityState(AirQualityLevelState state) {
}

@Override
public void processUpdate(String id, JsonElement state) {
public void processUpdate(String id, JsonElement state) throws JsonSyntaxException {
logger.debug("Twinguard: received update: {} {}", id, state);

AirQualityLevelState parsed = GSON.fromJson(state, AirQualityLevelState.class);
Expand Down

0 comments on commit ee0528b

Please sign in to comment.