Main: output exception stream directly to stdout
printf is used to output formated stringstream. Not only introductory information is somewhat repeated, but text can be sent directly to standard output.
This commit is contained in:
@@ -45,7 +45,6 @@
|
||||
#endif // HAVE_CONFIG_H
|
||||
|
||||
#include <cstdio>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <QByteArray>
|
||||
|
||||
@@ -176,11 +175,10 @@ PyMOD_INIT_FUNC(FreeCAD)
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
std::string appName = App::Application::Config()["ExeName"];
|
||||
std::stringstream msg;
|
||||
msg << "While initializing " << appName << " the following exception occurred: '"
|
||||
<< e.what() << "'\n\n";
|
||||
msg << "\nPlease contact the application's support team for more information.\n\n";
|
||||
printf("Initialization of %s failed:\n%s", appName.c_str(), msg.str().c_str());
|
||||
std::cout << "While initializing " << appName << " the following exception occurred: '"
|
||||
<< e.what() << "'\n\n";
|
||||
std::cout << "Please contact the application's support team for more information."
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
Base::EmptySequencer* seq = new Base::EmptySequencer();
|
||||
|
||||
Reference in New Issue
Block a user