X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ferrors%2FDoesNotExist.java;fp=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ferrors%2FDoesNotExist.java;h=316233f3008c83f65f1c9ce561146ab6c107598c;hp=0000000000000000000000000000000000000000;hb=969bd23cab98a79ca9101af33334000879fb60c5;hpb=866dba5cd5a3929bbeae85991796acb212338a08 diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/errors/DoesNotExist.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/errors/DoesNotExist.java new file mode 100644 index 000000000..316233f30 --- /dev/null +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/errors/DoesNotExist.java @@ -0,0 +1,32 @@ +package org.simantics.scl.compiler.errors; + + +@SuppressWarnings("rawtypes") +public enum DoesNotExist implements Failable { + INSTANCE; + + @SuppressWarnings("unchecked") + public static Failable getInstance() { + return INSTANCE; + } + + @Override + public Object getResult() { + throw new IllegalStateException("Module does not exist."); + } + + @Override + public boolean didSucceed() { + return false; + } + + @Override + public String toString() { + return "DoesNotExist"; + } + + @Override + public String getDescription() { + return "Module does not exist."; + } +}