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

@@ -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);