mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 06:59:03 +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?
|
// Is this a bad practice?
|
||||||
inline QDebug operator<<(QDebug debug, std::shared_ptr<ScriptException> e) {
|
inline QDebug operator<<(QDebug debug, std::shared_ptr<ScriptException> e) {
|
||||||
debug << "Exception:"
|
if (!e) {
|
||||||
<< e->errorMessage
|
debug << "[Null ScriptException]";
|
||||||
<< (e->additionalInfo.isEmpty() ? QString("") : "[" + e->additionalInfo + "]")
|
return debug;
|
||||||
<< " at line " << e->errorLine << ", column " << e->errorColumn;
|
|
||||||
|
|
||||||
if (e->backtrace.length()) {
|
|
||||||
debug << "Backtrace:";
|
|
||||||
debug << e->backtrace;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
debug << *e.get();
|
||||||
return debug;
|
return debug;
|
||||||
}
|
}
|
Loading…
Reference in a new issue