Skip to content

Commit

Permalink
Clean up some error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
johndlewis13 committed Oct 19, 2017
1 parent f9acc9d commit a3587bd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/io/forsta/ccsm/api/model/ForstaMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,13 @@ public static ForstaMessage fromJsonStringOrThrows(String messageBody) throws In
JSONObject distribution = jsonBody.getJSONObject("distribution");
forstaMessage.universalExpression = distribution.getString("expression");
} else {
Log.w(TAG, messageBody);
throw new InvalidMessagePayloadException("Control message type or other");
}
} catch (JSONException e) {
Log.e(TAG, "Invalid JSON message body");
Log.e(TAG, messageBody);
Log.e(TAG, "Invalid JSON message body: " + e.getMessage());
throw new InvalidMessagePayloadException(e.getMessage());
} catch (Exception e) {
Log.w(TAG, "Exception occurred");
Log.w(TAG, "Exception occurred: " + e.getMessage());
throw new InvalidMessagePayloadException(e.getMessage());
}
return forstaMessage;
Expand Down

0 comments on commit a3587bd

Please sign in to comment.