summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2004-12-03 14:57:48 +0000
committerpaltherr <paltherr@epfl.ch>2004-12-03 14:57:48 +0000
commit4fdab72617dbe4e049939e268df88f7a7efe5c06 (patch)
treef4b64dbe9097b1604b5d3a25de6f2f076c10d79a
parent162a5f7755a7c6c083c96f752a5cbc4f846bb31c (diff)
downloadscala-4fdab72617dbe4e049939e268df88f7a7efe5c06.tar.gz
scala-4fdab72617dbe4e049939e268df88f7a7efe5c06.tar.bz2
scala-4fdab72617dbe4e049939e268df88f7a7efe5c06.zip
- Removed fail methods in class Global
-rw-r--r--sources/scalac/Global.java36
-rw-r--r--sources/scalac/backend/msil/TypeCreator.java7
-rw-r--r--sources/scalac/transformer/TypesAsValuesPhase.java2
3 files changed, 4 insertions, 41 deletions
diff --git a/sources/scalac/Global.java b/sources/scalac/Global.java
index a5f82f3979..eb41e5f3e5 100644
--- a/sources/scalac/Global.java
+++ b/sources/scalac/Global.java
@@ -626,42 +626,6 @@ public abstract class Global {
// !!! >>> Interpreter stuff
- /** stop the compilation process immediately
- */
- public static Error fail() {
- throw new ApplicationError();
- }
-
- /** stop the compilation process immediately
- */
- public static Error fail(String message) {
- throw new ApplicationError(message);
- }
-
- /** stop the compilation process immediately
- */
- public static Error fail(String message, Object object) {
- throw new ApplicationError(message, object);
- }
-
- /** stop the compilation process immediately
- */
- public static Error fail(Object value) {
- throw new ApplicationError(value);
- }
-
- /** stop the compilation process immediately
- */
- public static Error fail(String message, Throwable cause) {
- throw new ApplicationError(message, cause);
- }
-
- /** stop the compilation process immediately
- */
- public static Error fail(Throwable cause) {
- throw new ApplicationError(cause);
- }
-
/** issue a global error
*/
public void error(String message) {
diff --git a/sources/scalac/backend/msil/TypeCreator.java b/sources/scalac/backend/msil/TypeCreator.java
index 48fe68f029..85f793d87a 100644
--- a/sources/scalac/backend/msil/TypeCreator.java
+++ b/sources/scalac/backend/msil/TypeCreator.java
@@ -427,7 +427,7 @@ final class TypeCreator {
translateMethod(alts[i], newClazz, newName);
return;
default:
- global.fail(Debug.show(sym) + " : " + Debug.show(sym.info()));
+ throw Debug.abort(Debug.show(sym, sym.info()));
}
}
@@ -793,8 +793,7 @@ final class TypeCreator {
break;
default:
- global.fail("Symbol does not have a CompoundType: " +
- Debug.show(clazz));
+ throw Debug.abort("Symbol does not have a CompoundType", clazz);
}
typeBuilders.add(type);
map(clazz, type);
@@ -940,7 +939,7 @@ final class TypeCreator {
}
break;
default:
- global.fail("Symbol doesn't have a method type: " + Debug.show(sym));
+ throw Debug.abort("Symbol doesn't have a method type", sym);
}
assert method != null
: Debug.show(owner) + " => Cannot find method: " + methodSignature(sym);
diff --git a/sources/scalac/transformer/TypesAsValuesPhase.java b/sources/scalac/transformer/TypesAsValuesPhase.java
index 39d56637f5..f8b90aee8a 100644
--- a/sources/scalac/transformer/TypesAsValuesPhase.java
+++ b/sources/scalac/transformer/TypesAsValuesPhase.java
@@ -771,7 +771,7 @@ public class TypesAsValuesPhase extends Phase {
return methodType(pos, vparams, result, owner, env);
default:
- throw global.fail("unexpected type: ", tp);
+ throw Debug.abortIllegalCase(tp);
}
}