mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-08-11 10:22:25 -04:00
Improved handling of exceptions and logging
This commit is contained in:
parent
2d6f17241a
commit
3967660297
@ -57,7 +57,7 @@ namespace
|
|||||||
void operator () (std::logic_error const& e) const
|
void operator () (std::logic_error const& e) const
|
||||||
{
|
{
|
||||||
std::cout << "std::logic_error: " << e.what () << std::endl;
|
std::cout << "std::logic_error: " << e.what () << std::endl;
|
||||||
//throw;
|
throw;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -103,11 +103,6 @@ namespace
|
|||||||
<< boost::log::add_value ("Function", function)
|
<< boost::log::add_value ("Function", function)
|
||||||
<< context.category << ": " << msg.toStdWString ();
|
<< context.category << ": " << msg.toStdWString ();
|
||||||
}
|
}
|
||||||
if (QtFatalMsg == type)
|
|
||||||
{
|
|
||||||
// bail out
|
|
||||||
throw std::runtime_error {"Fatal Qt Error"};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
main.cpp
2
main.cpp
@ -115,7 +115,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
auto const env = QProcessEnvironment::systemEnvironment ();
|
auto const env = QProcessEnvironment::systemEnvironment ();
|
||||||
|
|
||||||
QApplication a(argc, argv);
|
ExceptionCatchingApplication a(argc, argv);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// LOG_INfO ("+++++++++++++++++++++++++++ Resources ++++++++++++++++++++++++++++");
|
// LOG_INfO ("+++++++++++++++++++++++++++ Resources ++++++++++++++++++++++++++++");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user