handle eventual system error messages

This commit is contained in:
wmayer
2019-05-21 15:44:49 +02:00
parent ade1c5d19d
commit 5aff1c9188

View File

@@ -1180,7 +1180,7 @@ bool Application::activateWorkbench(const char* name)
}
catch (Py::Exception&) {
Base::PyException e; // extract the Python error text
QString msg = QString::fromLatin1(e.what());
QString msg = QString::fromUtf8(e.what());
QRegExp rx;
// ignore '<type 'exceptions.ImportError'>' prefixes
rx.setPattern(QLatin1String("^\\s*<type 'exceptions.ImportError'>:\\s*"));
@@ -1190,7 +1190,7 @@ bool Application::activateWorkbench(const char* name)
pos = rx.indexIn(msg);
}
Base::Console().Error("%s\n", (const char*)msg.toLatin1());
Base::Console().Error("%s\n", (const char*)msg.toUtf8());
if (!d->startingUp)
Base::Console().Error("%s\n", e.getStackTrace().c_str());
else