Update exception handling to use std::exception_ptr
#1180
+540
−111
std::exception_ptr
#1180