File tree Expand file tree Collapse file tree
src/main/java/net/modfest/fireblanket/diagnostics Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import com .mojang .logging .LogUtils ;
44import org .jetbrains .annotations .ApiStatus ;
5+ import org .jetbrains .annotations .Contract ;
56import org .jetbrains .annotations .NotNull ;
67import org .jetbrains .annotations .Nullable ;
78import org .slf4j .Logger ;
@@ -345,17 +346,17 @@ public static void expectJailbreak() throws IllegalStateException {
345346 * @see #dumpStack(Object...)
346347 */
347348 @ SuppressWarnings ("unused" ) // API
349+ @ Contract ("_, _ -> fail" )
348350 public static <T extends Throwable > void dumpStackAndThrow (
349351 final @ Nullable Supplier <@ Nullable T > throwable ,
350352 final @ Nullable Object @ Nullable ... context
351353 ) throws T {
352354 if (isAlreadyDumping ()) {
353355 logger .warn ("Terminating recursive call." );
354- return ;
356+ } else {
357+ dump (context );
355358 }
356359
357- dump (context );
358-
359360 // If we didn't get an exception provider for some reason,
360361 // fall back to throwing an assertion error instead.
361362 if (throwable == null ) {
You can’t perform that action at this time.
0 commit comments