]> git.cworth.org Git - apitrace/blobdiff - common/trace_writer_local.cpp
Abort on failure to open trace (fixes issue #50).
[apitrace] / common / trace_writer_local.cpp
index 2b1ef4304a8bdde0cbdfdc59eef0dd8926c5b377..9d0429b4890c90eb198c8a1e37d4e6703a8f7071 100644 (file)
@@ -112,7 +112,10 @@ LocalWriter::open(void) {
 
     os::log("apitrace: tracing to %s\n", lpFileName);
 
-    Writer::open(lpFileName);
+    if (!Writer::open(lpFileName)) {
+        os::log("apitrace: error: failed to open %s\n", lpFileName);
+        os::abort();
+    }
 
 #if 0
     // For debugging the exception handler