]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/module/repository/ImportFailure.java
Sync git svn branch with SVN repository r33200.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / module / repository / ImportFailure.java
1 package org.simantics.scl.compiler.module.repository;\r
2 \r
3 public class ImportFailure {\r
4     public final static Object MODULE_DOES_NOT_EXIST_REASON = new Object();\r
5     \r
6     public final long location;\r
7     public final String moduleName;\r
8     public final Object reason;\r
9     \r
10     public ImportFailure(long location, String moduleName, Object reason) {\r
11         this.location = location;\r
12         this.moduleName = moduleName;\r
13         this.reason = reason;\r
14     }\r
15     \r
16     @Override\r
17     public String toString() {\r
18         return "Failed to import " + moduleName + ", because it " + \r
19                 (reason == ImportFailure.MODULE_DOES_NOT_EXIST_REASON \r
20                         ? "does not exist."\r
21                         : "contains compilation errors.");\r
22     }\r
23 }\r