Skip to content

Commit

Permalink
Always throw a DittoRuntimeException when an error occcurres during d…
Browse files Browse the repository at this point in the history
…eserialization

Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
  • Loading branch information
Yannic92 committed Apr 30, 2019
1 parent 57b1480 commit 368865e
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -68,8 +68,8 @@ public T parse(final JsonObject jsonObject, final DittoHeaders dittoHeaders) {
} catch (final InvocationTargetException e) {
final Throwable targetException = e.getTargetException();

if (targetException instanceof RuntimeException) {
throw (RuntimeException) targetException;
if (targetException instanceof DittoRuntimeException) {
throw (DittoRuntimeException) targetException;
}

throw buildDittoJsonException(targetException, jsonObject, dittoHeaders);
Expand Down

0 comments on commit 368865e

Please sign in to comment.