mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Better unhandled exception handling:
Log thread name and exception type on unhandled exceptions and use a terminate handler to get a stack trace that includes the function that thows the exception.
This commit is contained in:
@@ -77,15 +77,12 @@ bool Job::shouldCancel () const
|
||||
|
||||
void Job::doJob ()
|
||||
{
|
||||
threadEntry (this, &Job::doJobImpl, "Job::doJob()",
|
||||
[this] ()
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "Job name: " << this->mName
|
||||
<< "; Job type: " << this->mType
|
||||
<< "; Job info: " << this->mJob.target_type().name();
|
||||
return ss.str();
|
||||
});
|
||||
std::stringstream ss;
|
||||
ss << "Job::doJob(); Job name: "
|
||||
<< mName << "; Job type: " << mType
|
||||
<< "; Job info: " << mJob.target_type ().name ();
|
||||
|
||||
threadEntry (this, &Job::doJobImpl, ss.str());
|
||||
}
|
||||
|
||||
void Job::rename (std::string const& newName)
|
||||
|
||||
Reference in New Issue
Block a user