[PATCH] TraceConverter.cc: Add final catch for exceptions

Ryan Long ryan.long at oarcorp.com
Mon Nov 15 20:21:20 UTC 2021


CID 1471639: Add catch for exception

Closes #4501
---
 tester/covoar/TraceConverter.cc | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/tester/covoar/TraceConverter.cc b/tester/covoar/TraceConverter.cc
index 7770b11..4c62b06 100644
--- a/tester/covoar/TraceConverter.cc
+++ b/tester/covoar/TraceConverter.cc
@@ -192,9 +192,19 @@ int main(
     }
   }
 
-  objdumpProcessor.loadAddressTable( executableInfo, objdumpFile, err );
-  log.processFile( logname, objdumpProcessor );
-  trace.writeFile( tracefile, &log, verbose );
+  try
+  {
+    objdumpProcessor.loadAddressTable( executableInfo, objdumpFile, err );
+    log.processFile( logname, objdumpProcessor );
+    trace.writeFile( tracefile, &log, verbose );
+  }
+  catch ( rld::error re )
+  {
+    std::cerr << "error: "
+              << re.where << ": " << re.what
+              << std::endl;
+    ec = 10;
+  }
 
   return ec;
 }
-- 
1.8.3.1



More information about the devel mailing list