Replace boost exceptions with std::exception.