]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/source/TextualModuleSource.java
(refs #7250) Error messages for undefined existentials
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / source / TextualModuleSource.java
index 3aa3f4281380dad972b26a98b1098264602b8656..50cbb1ac461ea271e0c4700d37d149fc23a351a2 100644 (file)
@@ -93,13 +93,13 @@ public abstract class TextualModuleSource implements ModuleSource {
             if(compiler.getErrorLog().hasNoErrors())
                 return new Success<Module>(compiler.getModule());
             else {
-                if(!options.silent)
+                if(options == null || !options.silent)
                     LOGGER.error("While compiling " + getModuleName() + ":\n    " +
                             CompilationErrorFormatter.toString(getSourceReader(null), compiler.getErrorLog().getErrors()).replaceAll("\n", "\n    "));
                 return new Failure(compiler.getErrorLog().getErrors());
             }
         } catch (IOException e) {
-            if(!options.silent)
+            if(options == null || !options.silent)
                 LOGGER.error("Compilation of module " + moduleName + " failed.", e);
             return new Failure(e);
         }