summaryrefslogtreecommitdiff
path: root/src/scalap
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-12-05 02:56:08 +0000
committerPaul Phillips <paulp@improving.org>2010-12-05 02:56:08 +0000
commit77eb8fefec3e62ead95c7d409ec5a28f30289ec3 (patch)
tree5e035714a7e6363d1ae7f712d5b1f73c1d27d79e /src/scalap
parent626e38940b72f5e8445ecbece4d41996b5e2842e (diff)
downloadscala-77eb8fefec3e62ead95c7d409ec5a28f30289ec3.tar.gz
scala-77eb8fefec3e62ead95c7d409ec5a28f30289ec3.tar.bz2
scala-77eb8fefec3e62ead95c7d409ec5a28f30289ec3.zip
Mopping up after the deprecation of exit and er...
Mopping up after the deprecation of exit and error. It is decidedly non-trivial (at least for the IDE-impaired) to be completely sure of which error function was being called when there were about twenty with the same signature in trunk and they are being variously inherited, imported, shadowed, etc. So although I was careful, the possibility exists that something is now calling a different "error" function than before. Caveat programmer. (And let's all make it our policy not to name anything "error" or "exit" from here on out....) No review.
Diffstat (limited to 'src/scalap')
-rw-r--r--src/scalap/scala/tools/scalap/Arguments.scala10
-rw-r--r--src/scalap/scala/tools/scalap/CodeWriter.scala4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/scalap/scala/tools/scalap/Arguments.scala b/src/scalap/scala/tools/scalap/Arguments.scala
index 39f74cbfac..ebe3d972f0 100644
--- a/src/scalap/scala/tools/scalap/Arguments.scala
+++ b/src/scalap/scala/tools/scalap/Arguments.scala
@@ -21,7 +21,7 @@ object Arguments {
val prefixedBindings: Map[String, Char] = new HashMap
val optionalBindings: Map[String, Char] = new HashMap
- def error(message: String): Unit = Console.println(message)
+ def argumentError(message: String): Unit = Console.println(message)
def withOption(option: String): Parser = {
options += option
@@ -51,7 +51,7 @@ object Arguments {
def parseBinding(str: String, separator: Char): (String, String) = {
val eqls = str.indexOf(separator)
if (eqls < 0) {
- error("missing '" + separator + "' in binding '" + str + "'")
+ argumentError("missing '" + separator + "' in binding '" + str + "'")
Pair("", "")
} else
Pair(str.substring(0, eqls).trim(),
@@ -78,7 +78,7 @@ object Arguments {
i += 1
} else if (optionalArgs contains args(i)) {
if ((i + 1) == args.length) {
- error("missing argument for '" + args(i) + "'")
+ argumentError("missing argument for '" + args(i) + "'")
i += 1
} else {
res.addArgument(args(i), args(i + 1))
@@ -86,7 +86,7 @@ object Arguments {
}
} else if (optionalBindings contains args(i)) {
if ((i + 1) == args.length) {
- error("missing argument for '" + args(i) + "'")
+ argumentError("missing argument for '" + args(i) + "'")
i += 1
} else {
res.addBinding(args(i),
@@ -115,7 +115,7 @@ object Arguments {
}
}
if (i == j) {
- error("unknown option '" + args(i) + "'")
+ argumentError("unknown option '" + args(i) + "'")
i = i + 1
}
}
diff --git a/src/scalap/scala/tools/scalap/CodeWriter.scala b/src/scalap/scala/tools/scalap/CodeWriter.scala
index aee7e84e97..6f00df7660 100644
--- a/src/scalap/scala/tools/scalap/CodeWriter.scala
+++ b/src/scalap/scala/tools/scalap/CodeWriter.scala
@@ -58,7 +58,7 @@ class CodeWriter(writer: Writer) {
try {
writer.write(nl)
} catch {
- case e => error("IO error")
+ case e => system.error("IO error")
}
line = align
align = true
@@ -127,7 +127,7 @@ class CodeWriter(writer: Writer) {
line = false
this
} catch {
- case e => error("IO error")
+ case e => system.error("IO error")
}
override def toString(): String = writer.toString()