WebSocket API

This commit is contained in:
2023-03-14 16:22:50 +01:00
parent b6dba62fa4
commit fd828d600e
16 changed files with 910 additions and 3 deletions

View File

@@ -96,9 +96,14 @@ public class ThrowableUtil {
}
private static RuntimeException uncheck(Throwable t, boolean convertReflectionExceptionToError) {
/**
* Makes the provided Throwable unckecked if necessary.
* @param t the throwable to eventually wrap into a {@link RuntimeException}.
* @param convertReflectionExceptionToError true to convert reflection related exception to their error counterpart.
* @return a {@link RuntimeException}
* @throws Error if one is passed as the parameter.
*/
public static RuntimeException uncheck(Throwable t, boolean convertReflectionExceptionToError) {
if (t instanceof Error er) {
throw er;
}