Fixed Bugsnag error log

This commit is contained in:
M66B 2023-12-12 16:47:47 +01:00
parent 0a1e84dffe
commit 409d18a8cd
2 changed files with 3 additions and 6 deletions

View File

@ -304,9 +304,6 @@ public class Log {
try {
ThrowableWrapper ex = new ThrowableWrapper();
ex.setMessage(msg);
List<StackTraceElement> ss = new ArrayList<>(Arrays.asList(ex.getStackTrace()));
ss.remove(0);
ex.setStackTrace(ss.toArray(new StackTraceElement[0]));
Bugsnag.notify(ex, new OnErrorCallback() {
@Override
public boolean onError(@NonNull Event event) {

View File

@ -70,13 +70,13 @@ public class ThrowableWrapper extends Throwable {
@Nullable
@Override
public String getMessage() {
return ex.getMessage();
return getSafeMessage();
}
@Nullable
@Override
public String getLocalizedMessage() {
return ex.getLocalizedMessage();
return getSafeMessage();
}
@NonNull
@ -94,6 +94,6 @@ public class ThrowableWrapper extends Throwable {
@NonNull
@Override
public String toString() {
return ex.toString();
return toSafeString();
}
}