Cleanup how transport errors are handled in NN utils

Prior to this change, whenever the NN utility code encountered a HIDL
transport error, the error message would display the file and line
number of the "handleTransportError" function itself. This change
introduces a new macro "HANDLE_TRANSPORT_FAILURE" that handles the
transport error in a similar way but now the error message displays
the file and line number of where the macro is called.

Bug: N/A
Test: mma
Change-Id: I35b34f8f5be52b7fcff0fbb58a37ab2b8c7dd8bb
diff --git a/neuralnetworks/1.3/utils/src/Buffer.cpp b/neuralnetworks/1.3/utils/src/Buffer.cpp
index a880031..ffdeccd 100644
--- a/neuralnetworks/1.3/utils/src/Buffer.cpp
+++ b/neuralnetworks/1.3/utils/src/Buffer.cpp
@@ -64,7 +64,7 @@
     const auto hidlDst = NN_TRY(convert(dst));
 
     const auto ret = kBuffer->copyTo(hidlDst);
-    const auto status = NN_TRY(hal::utils::handleTransportError(ret));
+    const auto status = HANDLE_TRANSPORT_FAILURE(ret);
     if (status != ErrorStatus::NONE) {
         const auto canonical = nn::convert(status).value_or(nn::ErrorStatus::GENERAL_FAILURE);
         return NN_ERROR(canonical) << "IBuffer::copyTo failed with " << toString(status);
@@ -79,7 +79,7 @@
     const auto hidlDimensions = hidl_vec<uint32_t>(dimensions);
 
     const auto ret = kBuffer->copyFrom(hidlSrc, hidlDimensions);
-    const auto status = NN_TRY(hal::utils::handleTransportError(ret));
+    const auto status = HANDLE_TRANSPORT_FAILURE(ret);
     if (status != ErrorStatus::NONE) {
         const auto canonical = nn::convert(status).value_or(nn::ErrorStatus::GENERAL_FAILURE);
         return NN_ERROR(canonical) << "IBuffer::copyFrom failed with " << toString(status);