mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-23 09:09:15 +00:00
suppress json syntax exceptions from being reported to sentry
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.volmit.iris.util.misc;
|
package com.volmit.iris.util.misc;
|
||||||
|
|
||||||
|
import com.google.gson.JsonSyntaxException;
|
||||||
import com.volmit.iris.BuildConstants;
|
import com.volmit.iris.BuildConstants;
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.core.IrisSettings;
|
import com.volmit.iris.core.IrisSettings;
|
||||||
@@ -74,7 +75,9 @@ public class Bindings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static boolean suppress(Throwable e) {
|
private static boolean suppress(Throwable e) {
|
||||||
return (e instanceof IllegalStateException ex && "zip file closed".equals(ex.getMessage())) || e instanceof JSONException;
|
return (e instanceof IllegalStateException ex && "zip file closed".equals(ex.getMessage()))
|
||||||
|
|| e instanceof JSONException
|
||||||
|
|| e instanceof JsonSyntaxException;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user