mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-04 06:20:26 +00:00
Extended error messages in debug mode
This commit is contained in:
parent
3b81917853
commit
186f32b173
1 changed files with 8 additions and 2 deletions
|
@ -288,11 +288,17 @@ public class Helper {
|
|||
|
||||
static String formatThrowable(Throwable ex, String separator) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(ex.getMessage() == null ? ex.getClass().getName() : ex.getMessage());
|
||||
if (BuildConfig.DEBUG)
|
||||
sb.append(ex.toString());
|
||||
else
|
||||
sb.append(ex.getMessage() == null ? ex.getClass().getName() : ex.getMessage());
|
||||
|
||||
Throwable cause = ex.getCause();
|
||||
while (cause != null) {
|
||||
sb.append(separator).append(cause.getMessage() == null ? cause.getClass().getName() : cause.getMessage());
|
||||
if (BuildConfig.DEBUG)
|
||||
sb.append(separator).append(cause.toString());
|
||||
else
|
||||
sb.append(separator).append(cause.getMessage() == null ? cause.getClass().getName() : cause.getMessage());
|
||||
cause = cause.getCause();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue