Removed infinite loop from error logging.

God damn it was a dumb mistake again

Affects issues:
- Fixed #1491
This commit is contained in:
Rsl1122 2020-06-27 12:22:43 +03:00
parent e86e55785f
commit da7c3a0f97
2 changed files with 5 additions and 4 deletions

View File

@ -238,7 +238,7 @@ public class ErrorLogger implements ErrorHandler {
} }
previousLine = asLine; previousLine = asLine;
} }
cause = e.getCause(); cause = cause.getCause();
} }
return DigestUtils.sha256Hex(Integer.toString(seed)).substring(0, 10); return DigestUtils.sha256Hex(Integer.toString(seed)).substring(0, 10);
} }

View File

@ -116,9 +116,10 @@ class ErrorLoggerTest {
); );
List<String> lines = getLines(error.getClass().getSimpleName()); List<String> lines = getLines(error.getClass().getSimpleName());
assertTrue(lines.contains("java.lang.IllegalStateException"), () -> "Did not contain 'java.lang.IllegalStateException', " + lines); assertTrue(lines.contains("java.lang.IllegalStateException: java.lang.IllegalArgumentException: java.lang.NullPointerException"), () -> "Did not contain 'java.lang.IllegalStateException: java.lang.IllegalArgumentException: java.lang.NullPointerException', " + lines);
assertTrue(lines.contains("caused by: java.lang.IllegalArgumentException"), () -> "Did not contain 'caused by: java.lang.IllegalArgumentException', " + lines); assertTrue(lines.contains("Caused by:"), () -> "Did not contain 'Caused by:', " + lines);
assertTrue(lines.contains("caused by: java.lang.NullPointerException"), () -> "Did not contain 'caused by: java.lang.NullPointerException', " + lines); assertTrue(lines.contains("java.lang.IllegalArgumentException: java.lang.NullPointerException"), () -> "Did not contain 'java.lang.IllegalArgumentException: java.lang.NullPointerException', " + lines);
assertTrue(lines.contains("java.lang.NullPointerException"), () -> "Did not contain 'caused by: java.lang.NullPointerException', " + lines);
} }
@Test @Test