diff options
author | paltherr <paltherr@epfl.ch> | 2003-08-11 11:33:15 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-08-11 11:33:15 +0000 |
commit | eda495f66dd08d4b44bb29ec56a8dc7578056bf9 (patch) | |
tree | c291f9c2a4f7009cb27502f3fd785baf82319e6a | |
parent | 32f01ba87a5c1223eb9097d0a89f5203d93b8acc (diff) | |
download | scala-eda495f66dd08d4b44bb29ec56a8dc7578056bf9.tar.gz scala-eda495f66dd08d4b44bb29ec56a8dc7578056bf9.tar.bz2 scala-eda495f66dd08d4b44bb29ec56a8dc7578056bf9.zip |
- Removed printing of stack traces if not in de...
- Removed printing of stack traces if not in debug mode
-rw-r--r-- | sources/scalac/backend/msil/GenMSIL.java | 6 | ||||
-rw-r--r-- | sources/scalac/backend/msil/TypeCreator.java | 6 | ||||
-rw-r--r-- | sources/scalac/symtab/SourceCompleter.java | 2 | ||||
-rw-r--r-- | sources/scalac/symtab/classfile/ClassParser.java | 4 | ||||
-rw-r--r-- | sources/scalac/symtab/classfile/ClassfileParser.java | 5 | ||||
-rw-r--r-- | sources/scalac/symtab/classfile/SymblParser.java | 4 | ||||
-rw-r--r-- | sources/scalac/transformer/ExpandMixins.java | 1 |
7 files changed, 15 insertions, 13 deletions
diff --git a/sources/scalac/backend/msil/GenMSIL.java b/sources/scalac/backend/msil/GenMSIL.java index ad8d26082c..eb4ba27c1c 100644 --- a/sources/scalac/backend/msil/GenMSIL.java +++ b/sources/scalac/backend/msil/GenMSIL.java @@ -147,7 +147,7 @@ public class GenMSIL /*implements Modifiers */ { log("Processing method " + method.DeclaringType + "::" +method.Name); } - e.printStackTrace(); + if (global.debug) e.printStackTrace(); throw (Error) e; } tc.createTypes(); @@ -165,7 +165,7 @@ public class GenMSIL /*implements Modifiers */ { } } catch (IOException e) { - e.printStackTrace(); + if (global.debug) e.printStackTrace(); } } } @@ -451,7 +451,7 @@ public class GenMSIL /*implements Modifiers */ { try { i = gen2(tree, toType); } catch (Throwable e) { logErr(tree.pos, "gen(): Exception"); - e.printStackTrace(); + if (global.debug) e.printStackTrace(); System.exit(1); throw (Error) e; } diff --git a/sources/scalac/backend/msil/TypeCreator.java b/sources/scalac/backend/msil/TypeCreator.java index 5a4a8e84a5..faca45a182 100644 --- a/sources/scalac/backend/msil/TypeCreator.java +++ b/sources/scalac/backend/msil/TypeCreator.java @@ -313,7 +313,7 @@ public final class TypeCreator // log("getType: Exception cought for " + dumpSym(sym)); // //log("-->symbol.type() = " + Debug.show(sym.type())); // //log("-->symbol.info()" + Debug.show(sym.info())); -// e.printStackTrace(); +// if (global.debug) e.printStackTrace(); // } // return type; // } @@ -474,7 +474,7 @@ public final class TypeCreator method = getMethod2(sym); } catch (ClassCastException e) { logErr("getMethod: " + dumpSym(sym)); - e.printStackTrace(); + if (global.debug) e.printStackTrace(); } return method; } @@ -531,7 +531,7 @@ public final class TypeCreator method = createMethod2(sym); } catch (RuntimeException e) { logErr(e.getMessage()); - e.printStackTrace(); + if (global.debug) e.printStackTrace(); System.exit(1); } return method; diff --git a/sources/scalac/symtab/SourceCompleter.java b/sources/scalac/symtab/SourceCompleter.java index f835160b50..43a8ec8a10 100644 --- a/sources/scalac/symtab/SourceCompleter.java +++ b/sources/scalac/symtab/SourceCompleter.java @@ -44,7 +44,7 @@ public class SourceCompleter extends Type.LazyType { global.operation("added " + filename + " in " + (System.currentTimeMillis() - msec) + "ms"); } catch (IOException e) { - e.printStackTrace(); + if (global.debug) e.printStackTrace(); global.error("i/o error while loading " + c); c.setInfo(Type.ErrorType); } diff --git a/sources/scalac/symtab/classfile/ClassParser.java b/sources/scalac/symtab/classfile/ClassParser.java index 0dc29c87bb..d2fb514f08 100644 --- a/sources/scalac/symtab/classfile/ClassParser.java +++ b/sources/scalac/symtab/classfile/ClassParser.java @@ -46,7 +46,7 @@ public class ClassParser extends Type.LazyType { // e.def.complete(); } } catch (IOException e) { - e.printStackTrace(); + if (global.debug) e.printStackTrace(); global.error("i/o error while loading " + c); c.setInfo(Type.ErrorType); } @@ -97,7 +97,7 @@ public class ClassParser extends Type.LazyType { (System.currentTimeMillis() - msec) + "ms"); } } catch (IOException e) { - e.printStackTrace(); + if (global.debug) e.printStackTrace(); global.error("i/o error while loading " + c); c.setInfo(Type.ErrorType); } diff --git a/sources/scalac/symtab/classfile/ClassfileParser.java b/sources/scalac/symtab/classfile/ClassfileParser.java index da5300cb42..1fbd14174c 100644 --- a/sources/scalac/symtab/classfile/ClassfileParser.java +++ b/sources/scalac/symtab/classfile/ClassfileParser.java @@ -126,8 +126,9 @@ public class ClassfileParser implements ClassfileConstants { //System.out.println("module: " + c.module()); //System.out.println("modules class: " + c.module().type().symbol()); } catch (RuntimeException e) { - e.printStackTrace(); - throw new IOException("bad class file (" + e.getMessage() + ")"); + if (global.debug) e.printStackTrace(); + String s = e.getMessage() == null ? "" : " (" +e.getMessage()+ ")"; + throw new IOException("bad class file" + s); } } diff --git a/sources/scalac/symtab/classfile/SymblParser.java b/sources/scalac/symtab/classfile/SymblParser.java index 2f8956d608..aa1a1349f1 100644 --- a/sources/scalac/symtab/classfile/SymblParser.java +++ b/sources/scalac/symtab/classfile/SymblParser.java @@ -44,10 +44,10 @@ public class SymblParser extends ClassParser { */ } } catch (IOException e) { - e.printStackTrace(); + if (global.debug) e.printStackTrace(); global.error("i/o error while loading " + c); c.setInfo(Type.ErrorType); - } + } } } diff --git a/sources/scalac/transformer/ExpandMixins.java b/sources/scalac/transformer/ExpandMixins.java index 57ab76a5e9..07e8a587a5 100644 --- a/sources/scalac/transformer/ExpandMixins.java +++ b/sources/scalac/transformer/ExpandMixins.java @@ -137,6 +137,7 @@ public class ClassExpander { switch (type) { case TypeRef(Type prefix, Symbol symbol, Type[] args): map.insertType(symbol.typeParams(), args); + // !!! symbols could be equal but args different? need to rebind ? if (prefix.symbol() != symbol.owner()) inlineMixinTParams(prefix.baseType(symbol.owner())); return; |