replaced error_message with an exception_ptr, rethrown later