mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 04:07:11 +02:00
Deduplicate QDebug output
This commit is contained in:
parent
8d6270392d
commit
b1e2a94d71
1 changed files with 4 additions and 8 deletions
|
@ -167,15 +167,11 @@ inline QDebug operator<<(QDebug debug, const ScriptException& e) {
|
|||
|
||||
// Is this a bad practice?
|
||||
inline QDebug operator<<(QDebug debug, std::shared_ptr<ScriptException> e) {
|
||||
debug << "Exception:"
|
||||
<< e->errorMessage
|
||||
<< (e->additionalInfo.isEmpty() ? QString("") : "[" + e->additionalInfo + "]")
|
||||
<< " at line " << e->errorLine << ", column " << e->errorColumn;
|
||||
|
||||
if (e->backtrace.length()) {
|
||||
debug << "Backtrace:";
|
||||
debug << e->backtrace;
|
||||
if (!e) {
|
||||
debug << "[Null ScriptException]";
|
||||
return debug;
|
||||
}
|
||||
|
||||
debug << *e.get();
|
||||
return debug;
|
||||
}
|
Loading…
Reference in a new issue