--- /dev/null
+package org.simantics.scl.compiler.module.repository;\r
+\r
+public class ImportFailure {\r
+ public final static Object MODULE_DOES_NOT_EXIST_REASON = new Object();\r
+ \r
+ public final long location;\r
+ public final String moduleName;\r
+ public final Object reason;\r
+ \r
+ public ImportFailure(long location, String moduleName, Object reason) {\r
+ this.location = location;\r
+ this.moduleName = moduleName;\r
+ this.reason = reason;\r
+ }\r
+ \r
+ @Override\r
+ public String toString() {\r
+ return "Failed to import " + moduleName + ", because it " + \r
+ (reason == ImportFailure.MODULE_DOES_NOT_EXIST_REASON \r
+ ? "does not exist."\r
+ : "contains compilation errors.");\r
+ }\r
+}\r