summaryrefslogtreecommitdiffstats
path: root/tester/covoar/CoverageFactory.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tester/covoar/CoverageFactory.cc')
-rw-r--r--tester/covoar/CoverageFactory.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/tester/covoar/CoverageFactory.cc b/tester/covoar/CoverageFactory.cc
index 8b30371..991ba8f 100644
--- a/tester/covoar/CoverageFactory.cc
+++ b/tester/covoar/CoverageFactory.cc
@@ -10,6 +10,8 @@
#include <stdlib.h>
#include <string.h>
+#include <rld.h>
+
#include "CoverageFactory.h"
#include "CoverageReaderQEMU.h"
#include "CoverageReaderRTEMS.h"
@@ -35,13 +37,10 @@ Coverage::CoverageFormats_t Coverage::CoverageFormatToEnum(
if (!strcmp( format, "TSIM" ))
return COVERAGE_FORMAT_TSIM;
- fprintf(
- stderr,
- "ERROR: %s is an unknown coverage format "
- "(supported formats - QEMU, RTEMS, Skyeye and TSIM)\n",
- format
- );
- exit( 1 );
+ std::ostringstream what;
+ what << format << " is an unknown coverage format "
+ << "(supported formats - QEMU, RTEMS, Skyeye and TSIM)";
+ throw rld::error( what, "Coverage" );
}
Coverage::CoverageReaderBase* Coverage::CreateCoverageReader(