Make "descriptors" not depend on intellij-core

Remove dependency on ProcessCanceledException with a hacky solution not to
break anything at the moment
This commit is contained in:
Alexander Udalov
2014-08-14 16:10:24 +04:00
parent eab0342d39
commit 6913869b9c
2 changed files with 4 additions and 5 deletions
-1
View File
@@ -7,7 +7,6 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="intellij-core" level="project" />
<orderEntry type="module" module-name="util.runtime" />
<orderEntry type="module" module-name="serialization" />
<orderEntry type="library" exported="" name="builtins" level="project" />
@@ -16,7 +16,6 @@
package org.jetbrains.jet.lang.types;
import com.intellij.openapi.progress.ProcessCanceledException;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.lang.descriptors.TypeParameterDescriptor;
@@ -253,10 +252,11 @@ public class TypeSubstitutor {
try {
return o.toString();
}
catch (ProcessCanceledException e) {
throw e;
}
catch (Throwable e) {
if (e.getClass().getName().equals("com.intellij.openapi.progress.ProcessCanceledException")) {
//noinspection ConstantConditions
throw (RuntimeException) e;
}
return "[Exception while computing toString(): " + e + "]";
}
}