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:
seelabs
2016-07-05 16:12:15 -04:00
parent c9d8fa9e96
commit 6f3a35e8be
11 changed files with 125 additions and 271 deletions

View File

@@ -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)