Slint: avoid crash when destination file can't be created 15/17415/2
Calixte DENIZET [Fri, 30 Oct 2015 09:14:19 +0000 (10:14 +0100)]
Change-Id: I32d12ab4332e0aee3b181fb742f56ba1b1229cc1

scilab/modules/slint/src/cpp/SLintXmlResult.cpp

index 85d6f6f..1ba9791 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "output/SLintXmlResult.hxx"
 #include "checkers/SLintChecker.hxx"
+#include "FileException.hxx"
 #include "SLint.hxx"
 #include "SciFile.hxx"
 #include "UTF8.hxx"
@@ -36,6 +37,7 @@ SLintXmlResult::SLintXmlResult(const std::wstring & _path) : current(nullptr), p
     {
         delete out;
         out = nullptr;
+        throw FileException(fullpath, L"Can\'t open it.");
     }
     else
     {