]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/module/repository/ImportFailure.java
Fixed all line endings of the repository
[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;
2
3 public class ImportFailure {
4     public final static Object MODULE_DOES_NOT_EXIST_REASON = new Object();
5     
6     public final long location;
7     public final String moduleName;
8     public final Object reason;
9     
10     public ImportFailure(long location, String moduleName, Object reason) {
11         this.location = location;
12         this.moduleName = moduleName;
13         this.reason = reason;
14     }
15     
16     @Override
17     public String toString() {
18         return "Failed to import " + moduleName + ", because it " + 
19                 (reason == ImportFailure.MODULE_DOES_NOT_EXIST_REASON 
20                         ? "does not exist."
21                         : "contains compilation errors.");
22     }
23 }