diff --git a/libraries/script-engine/src/ScriptException.h b/libraries/script-engine/src/ScriptException.h index 89a48fa4b2..92ae09617b 100644 --- a/libraries/script-engine/src/ScriptException.h +++ b/libraries/script-engine/src/ScriptException.h @@ -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 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; } \ No newline at end of file