Skip to content

Commit

Permalink
Do not fallback to unsupported operation exceptions to avoid oversigh…
Browse files Browse the repository at this point in the history
…ts in code changes.
  • Loading branch information
raphw committed Dec 18, 2023
1 parent 5c0c438 commit ce2fd1c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions byte-buddy-dep/src/main/java/net/bytebuddy/build/Plugin.java
Expand Up @@ -1183,14 +1183,14 @@ public void onError(TypeDescription typeDescription, Plugin plugin, Throwable th
* {@inheritDoc}
*/
public void onError(TypeDescription typeDescription, List<Throwable> throwables) {
throw new UnsupportedOperationException("onError");
throw new IllegalStateException("Failed to transform " + typeDescription + ": " + throwables);
}

/**
* {@inheritDoc}
*/
public void onError(Map<TypeDescription, List<Throwable>> throwables) {
throw new UnsupportedOperationException("onError");
throw new IllegalStateException("Failed to transform at least one type: " + throwables);
}
},

Expand All @@ -1216,7 +1216,7 @@ public void onError(TypeDescription typeDescription, List<Throwable> throwables)
* {@inheritDoc}
*/
public void onError(Map<TypeDescription, List<Throwable>> throwables) {
throw new UnsupportedOperationException("onError");
throw new IllegalStateException("Failed to transform at least one type: " + throwables);
}
},

Expand Down

0 comments on commit ce2fd1c

Please sign in to comment.