[rtems-tools commit] TraceConverter.cc: Add final catch for exceptions

Joel Sherrill joel at rtems.org
Tue Nov 30 16:00:19 UTC 2021


Module:    rtems-tools
Branch:    master
Commit:    59ca889149470477955e8842a95f64850dc33101
Changeset: http://git.rtems.org/rtems-tools/commit/?id=59ca889149470477955e8842a95f64850dc33101

Author:    Ryan Long <ryan.long at oarcorp.com>
Date:      Mon Nov 15 15:19:24 2021 -0500

TraceConverter.cc: Add final catch for exceptions

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;
 }



More information about the vc mailing list