MCPcopy Create free account
hub / github.com/VolmitSoftware/Adapt / attemptCatch

Method attemptCatch

src/main/java/com/volmit/adapt/util/J.java:93–101  ·  view source on GitHub ↗
(NastyRunnable r)

Source from the content-addressed store, hash-verified

91 }
92
93 public static Throwable attemptCatch(NastyRunnable r) {
94 try {
95 r.run();
96 } catch (Throwable e) {
97 return e;
98 }
99
100 return null;
101 }
102
103 public static <T> T attempt(Supplier<T> t, T i) {
104 try {

Callers 1

attemptMethod · 0.95

Calls 1

runMethod · 0.65

Tested by

no test coverage detected