|
|
@ -207,10 +207,13 @@ public class Log {
|
|
|
|
public static int w(Throwable ex) {
|
|
|
|
public static int w(Throwable ex) {
|
|
|
|
if (BuildConfig.BETA_RELEASE)
|
|
|
|
if (BuildConfig.BETA_RELEASE)
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
final StackTraceElement[] ste = new Throwable().getStackTrace();
|
|
|
|
Bugsnag.notify(ex, new OnErrorCallback() {
|
|
|
|
Bugsnag.notify(ex, new OnErrorCallback() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean onError(@NonNull Event event) {
|
|
|
|
public boolean onError(@NonNull Event event) {
|
|
|
|
event.setSeverity(Severity.INFO);
|
|
|
|
event.setSeverity(Severity.INFO);
|
|
|
|
|
|
|
|
if (ste.length > 1)
|
|
|
|
|
|
|
|
event.addMetadata("extra", "caller", ste[1].toString());
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -223,10 +226,13 @@ public class Log {
|
|
|
|
public static int e(Throwable ex) {
|
|
|
|
public static int e(Throwable ex) {
|
|
|
|
if (BuildConfig.BETA_RELEASE)
|
|
|
|
if (BuildConfig.BETA_RELEASE)
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
final StackTraceElement[] ste = new Throwable().getStackTrace();
|
|
|
|
Bugsnag.notify(ex, new OnErrorCallback() {
|
|
|
|
Bugsnag.notify(ex, new OnErrorCallback() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean onError(@NonNull Event event) {
|
|
|
|
public boolean onError(@NonNull Event event) {
|
|
|
|
event.setSeverity(Severity.WARNING);
|
|
|
|
event.setSeverity(Severity.WARNING);
|
|
|
|
|
|
|
|
if (ste.length > 1)
|
|
|
|
|
|
|
|
event.addMetadata("extra", "caller", ste[1].toString());
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|