Merge pull request #5920 from kevlahnota/master2

Update Sentry
This commit is contained in:
kevlahnota
2024-08-14 13:26:48 +08:00
committed by GitHub
10 changed files with 17 additions and 24 deletions

View File

@@ -32,7 +32,7 @@
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry-logback</artifactId>
<version>5.7.0</version>
<version>7.14.0</version>
</dependency>
</dependencies>
</project>

View File

@@ -240,7 +240,7 @@ public class ManaEffect extends SpellAbilityEffect {
Breadcrumb bread = new Breadcrumb(msg);
bread.setData("Card", card.getName());
bread.setData("SA", sa.toString());
Sentry.addBreadcrumb(bread, sa);
Sentry.addBreadcrumb(bread);
continue;
}

View File

@@ -2613,7 +2613,7 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
Breadcrumb bread = new Breadcrumb(msg);
bread.setData("Card", this.getName());
bread.setData("Keyword", keyword);
Sentry.addBreadcrumb(bread, this);
Sentry.addBreadcrumb(bread);
throw new RuntimeException("Error in Card " + this.getName() + " with Keyword " + keyword, e);
}
@@ -3184,7 +3184,7 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
Breadcrumb bread = new Breadcrumb(msg);
bread.setData("Card", this.getName());
bread.setData("Keyword", keyword);
Sentry.addBreadcrumb(bread, this);
Sentry.addBreadcrumb(bread);
throw new RuntimeException("Error in Card " + this.getName() + " with Keyword " + keyword, e);
}

View File

@@ -215,7 +215,7 @@ public class CardCopyService {
bread.setData("Card", copyFrom.getName());
bread.setData("CardState", copyFrom.getCurrentStateName().toString());
bread.setData("Player", copyFrom.getController().getName());
Sentry.addBreadcrumb(bread, copyFrom);
Sentry.addBreadcrumb(bread);
final Card newCopy = new Card(copyFrom.getId(), copyFrom.getPaperCard(), copyFrom.getGame(), null);
cachedMap.put(copyFrom.getId(), newCopy);

View File

@@ -542,7 +542,7 @@ public class CardFactoryUtil {
Breadcrumb bread = new Breadcrumb(msg);
bread.setData("Card", card.getName());
bread.setData("Ability", rawAbility);
Sentry.addBreadcrumb(bread, card);
Sentry.addBreadcrumb(bread);
// rethrow the exception with card Name for the user
throw new RuntimeException("crash in raw Ability, check card script of " + card.getName(), e);

View File

@@ -303,7 +303,7 @@ public class CardState extends GameObject implements IHasSVars {
Breadcrumb bread = new Breadcrumb(msg);
bread.setData("Card", card.getName());
bread.setData("Keyword", s);
Sentry.addBreadcrumb(bread, this);
Sentry.addBreadcrumb(bread);
//rethrow
throw new RuntimeException("Error in Keyword " + s + " for card " + card.getName(), e);

View File

@@ -106,7 +106,7 @@ public abstract class KeywordInstance<T extends KeywordInstance<?>> implements K
Breadcrumb bread = new Breadcrumb(msg);
bread.setData("Card", host.getName());
bread.setData("Keyword", this.original);
Sentry.addBreadcrumb(bread, this);
Sentry.addBreadcrumb(bread);
// add Extra for debugging
Sentry.setExtra("Card", host.getName());
@@ -122,7 +122,7 @@ public abstract class KeywordInstance<T extends KeywordInstance<?>> implements K
Breadcrumb bread = new Breadcrumb(msg);
bread.setData("Card", host.getName());
bread.setData("Keyword", this.original);
Sentry.addBreadcrumb(bread, this);
Sentry.addBreadcrumb(bread);
//rethrow
throw new RuntimeException("Error in Keyword " + this.original + " for card " + host.getName(), e);
@@ -157,7 +157,7 @@ public abstract class KeywordInstance<T extends KeywordInstance<?>> implements K
Breadcrumb bread = new Breadcrumb(msg);
bread.setData("Player", player.getName());
bread.setData("Keyword", this.original);
Sentry.addBreadcrumb(bread, this);
Sentry.addBreadcrumb(bread);
// add Extra for debugging
Sentry.setExtra("Player", player.getName());
@@ -173,7 +173,7 @@ public abstract class KeywordInstance<T extends KeywordInstance<?>> implements K
Breadcrumb bread = new Breadcrumb(msg);
bread.setData("Player", player.getName());
bread.setData("Keyword", this.original);
Sentry.addBreadcrumb(bread, this);
Sentry.addBreadcrumb(bread);
//rethrow
throw new RuntimeException("Error in Keyword " + this.original + " for player " + player.getName(), e);

View File

@@ -135,7 +135,7 @@ public class TriggerHandler {
Breadcrumb bread = new Breadcrumb(msg);
bread.setData("Card", host.getName());
bread.setData("Trigger", trigParse);
Sentry.addBreadcrumb(bread, host);
Sentry.addBreadcrumb(bread);
//rethrow
throw new RuntimeException("Error in Trigger for Card: " + host.getName(), e);
@@ -163,7 +163,7 @@ public class TriggerHandler {
Breadcrumb bread = new Breadcrumb(msg);
bread.setData("Card", host.getName());
bread.setData("Params", mapParams.toString());
Sentry.addBreadcrumb(bread, host);
Sentry.addBreadcrumb(bread);
//rethrow
throw new RuntimeException("Error in Trigger for Card: " + host.getName(), e);

View File

@@ -133,7 +133,7 @@
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry-android</artifactId>
<version>5.7.0</version>
<version>7.14.0</version>
<type>aar</type>
<exclusions>
<exclusion>
@@ -150,7 +150,7 @@
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry-android-core</artifactId>
<version>5.7.0</version>
<version>7.14.0</version>
<type>aar</type>
<exclusions>
<exclusion>
@@ -170,7 +170,7 @@
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry-android-ndk</artifactId>
<version>5.7.0</version>
<version>7.14.0</version>
<type>aar</type>
<exclusions>
<exclusion>
@@ -191,12 +191,6 @@
</exclusion>
</exclusions>
</dependency>
<!-- runtime dependency of sentry -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.badlogicgames.gdx-controllers</groupId>
<artifactId>gdx-controllers-android</artifactId>

View File

@@ -110,8 +110,7 @@ public final class FModel {
if (GuiBase.isAndroid()) //todo get device on other mobile platforms
System.out.println(GuiBase.getDeviceName() + " (RAM: " + GuiBase.getDeviceRAM() + "MB, Android " + GuiBase.getAndroidRelease() + " API Level " + GuiBase.getAndroidAPILevel() + ")");
else {
System.out.println(System.getProperty("os.name") + " (" + System.getProperty("os.version") + " " + System.getProperty("os.arch") + ")");
System.out.println("Java Version - " + RuntimeVersion.of(System.getProperty("java.version")).toString());
System.out.println(System.getProperty("os.name") + " (" + System.getProperty("os.version") + " " + System.getProperty("os.arch") + ")\n" + System.getProperty("java.vendor") + " (Java " + System.getProperty("java.runtime.version") + ", " + System.getProperty("java.vm.name") + ")");
}
ImageKeys.initializeDirs(
ForgeConstants.CACHE_CARD_PICS_DIR, ForgeConstants.CACHE_CARD_PICS_SUBDIR,