Dispatch exception handling changes.

 - now dispatch catches std::system_error instead of std::exception.
 - error_code is logged as well.