From a3d87e730b732ec25009547a12706b049e260b1d Mon Sep 17 00:00:00 2001
From: Sam Yates <halfflat@gmail.com>
Date: Fri, 20 Jul 2018 12:40:46 +0200
Subject: [PATCH] Better error message on missing file.

* Don't call a missing file an 'internal compiler error'.
---
 modcc/modcc.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/modcc/modcc.cpp b/modcc/modcc.cpp
index b3789bd6..13dd6003 100644
--- a/modcc/modcc.cpp
+++ b/modcc/modcc.cpp
@@ -308,13 +308,16 @@ int main(int argc, char **argv) {
             }
         }
     }
-    catch(compiler_exception& e) {
+    catch (io::bulkio_error& e) {
+        return report_error(e.what());
+    }
+    catch (compiler_exception& e) {
         return report_ice(e.what()+std::string(" @ ")+to_string(e.location()));
     }
-    catch(std::exception& e) {
+    catch (std::exception& e) {
         return report_ice(e.what());
     }
-    catch(...) {
+    catch (...) {
         return report_ice("");
     }
 
-- 
GitLab