Skip to content

Commit

Permalink
Cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
markushi committed Oct 4, 2024
1 parent cf412d4 commit 7f701e5
Showing 1 changed file with 4 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,7 @@ public void addBreadcrumb(final @NotNull Breadcrumb crumb) {
@Override
public void setTag(final @NotNull String key, final @NotNull String value) {
try {
options
.getExecutorService()
.submit(
() -> {
nativeScope.setTag(key, value);
});
options.getExecutorService().submit(() -> nativeScope.setTag(key, value));
} catch (Throwable e) {
options.getLogger().log(SentryLevel.ERROR, e, "Scope sync setTag(%s) has an error.", key);
}
Expand All @@ -103,12 +98,7 @@ public void setTag(final @NotNull String key, final @NotNull String value) {
@Override
public void removeTag(final @NotNull String key) {
try {
options
.getExecutorService()
.submit(
() -> {
nativeScope.removeTag(key);
});
options.getExecutorService().submit(() -> nativeScope.removeTag(key));
} catch (Throwable e) {
options.getLogger().log(SentryLevel.ERROR, e, "Scope sync removeTag(%s) has an error.", key);
}
Expand All @@ -117,12 +107,7 @@ public void removeTag(final @NotNull String key) {
@Override
public void setExtra(final @NotNull String key, final @NotNull String value) {
try {
options
.getExecutorService()
.submit(
() -> {
nativeScope.setExtra(key, value);
});
options.getExecutorService().submit(() -> nativeScope.setExtra(key, value));
} catch (Throwable e) {
options.getLogger().log(SentryLevel.ERROR, e, "Scope sync setExtra(%s) has an error.", key);
}
Expand All @@ -131,12 +116,7 @@ public void setExtra(final @NotNull String key, final @NotNull String value) {
@Override
public void removeExtra(final @NotNull String key) {
try {
options
.getExecutorService()
.submit(
() -> {
nativeScope.removeExtra(key);
});
options.getExecutorService().submit(() -> nativeScope.removeExtra(key));
} catch (Throwable e) {
options
.getLogger()
Expand Down

0 comments on commit 7f701e5

Please sign in to comment.