diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-08-19 23:50:36 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-08-19 23:50:36 +0200 |
commit | 9681f724e5ac0d859c575d093c6dd656a3b9e5c7 (patch) | |
tree | c77398a22fb93a596da76b8ec1f34da775b989c2 | |
parent | 5bc29b06a9268a43fe13a627ac02f34a77c76895 (diff) | |
download | MultiMC-9681f724e5ac0d859c575d093c6dd656a3b9e5c7.tar MultiMC-9681f724e5ac0d859c575d093c6dd656a3b9e5c7.tar.gz MultiMC-9681f724e5ac0d859c575d093c6dd656a3b9e5c7.tar.lz MultiMC-9681f724e5ac0d859c575d093c6dd656a3b9e5c7.tar.xz MultiMC-9681f724e5ac0d859c575d093c6dd656a3b9e5c7.zip |
NOISSUE revamp the minecraft log exception detection
-rw-r--r-- | logic/minecraft/MinecraftInstance.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/logic/minecraft/MinecraftInstance.cpp b/logic/minecraft/MinecraftInstance.cpp index c3d73456..d61801c9 100644 --- a/logic/minecraft/MinecraftInstance.cpp +++ b/logic/minecraft/MinecraftInstance.cpp @@ -274,7 +274,14 @@ MessageLevel::Enum MinecraftInstance::guessLevel(const QString &line, MessageLev } if (line.contains("overwriting existing")) return MessageLevel::Fatal; - if (line.contains("Exception in thread") || line.contains(QRegularExpression("\\s+at "))) + //NOTE: this diverges from the real regexp. no unicode, the first section is + instead of * + static const QString javaSymbol = "([a-zA-Z_$][a-zA-Z\\d_$]*\\.)+[a-zA-Z_$][a-zA-Z\\d_$]*"; + if (line.contains("Exception in thread") + || line.contains(QRegularExpression("\\s+at " + javaSymbol)) + || line.contains(QRegularExpression("Caused by: " + javaSymbol)) + || line.contains(QRegularExpression("([a-zA-Z_$][a-zA-Z\\d_$]*\\.)+[a-zA-Z_$]?[a-zA-Z\\d_$]*(Exception|Error|Throwable)")) + || line.contains(QRegularExpression("... \\d+ more$")) + ) return MessageLevel::Error; return level; } |