mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2026-01-04 15:41:38 +00:00
处理空包异常
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package net.momirealms.craftengine.core.util;
|
||||
|
||||
public final class ExceptionUtils {
|
||||
private ExceptionUtils() {}
|
||||
|
||||
public static boolean hasException(Throwable t, Exception e) {
|
||||
while (t != null) {
|
||||
if (t == e) {
|
||||
return true;
|
||||
}
|
||||
t = t.getCause();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user