Log error from the net's run (#14035)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14035

Log error meesage in case of net's run failure

Reviewed By: andrewwdye

Differential Revision: D13085431

fbshipit-source-id: d79f76782410cd3a5bd2d8d7f5fb1e535d821051
diff --git a/caffe2/core/net_async_base.cc b/caffe2/core/net_async_base.cc
index 6b11db5..894277e 100644
--- a/caffe2/core/net_async_base.cc
+++ b/caffe2/core/net_async_base.cc
@@ -126,10 +126,14 @@
     }
   }
   if (first_exc_task_id >= 0) {
+    LOG(ERROR) << "Rethrowing exception from the run of '" << Name() << "'";
     event(first_exc_task_id).RethrowException();
   }
 #endif // CAFFE2_USE_EXCEPTION_PTR
 
+  if (!success_) {
+    LOG(ERROR) << "Error encountered in the run of '" << Name() << "'";
+  }
   return success_;
 }