Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
libdeng2|Task: Catch exceptions thrown during running of a task
  • Loading branch information
skyjake committed May 2, 2013
1 parent 5d35cfc commit 8501410
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion doomsday/libdeng2/src/concurrency/task.cpp
Expand Up @@ -33,7 +33,15 @@ TaskPool &Task::pool() const

void Task::run()
{
runTask();
try
{
runTask();
}
catch(Error const &er)
{
LOG_AS("Task");
LOG_WARNING("Aborted due to exception: ") << er.asText();
}

// Cleanup.
pool().taskFinished(*this);
Expand Down

0 comments on commit 8501410

Please sign in to comment.