diff options
author | Paul Phillips <paulp@improving.org> | 2011-01-12 02:49:08 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-01-12 02:49:08 +0000 |
commit | 5bada810b4c7eda186aa40b94a78326520b3fa92 (patch) | |
tree | eee2227bf7f53a6b04e9732d887961b403975ab5 /src/detach/library | |
parent | 566fefb05abe31e90f765d1fb0a89b264302d9ce (diff) | |
download | scala-5bada810b4c7eda186aa40b94a78326520b3fa92.tar.gz scala-5bada810b4c7eda186aa40b94a78326520b3fa92.tar.bz2 scala-5bada810b4c7eda186aa40b94a78326520b3fa92.zip |
Imported sbt.Process into trunk, in the guise o...
Imported sbt.Process into trunk, in the guise of package
scala.sys.process. It is largely indistinguishable from the version in
sbt, at least from the outside.
Also, I renamed package system to sys. I wanted to do that from the
beginning and the desire has only grown since then. Sometimes a short
identifier is just critical to usability: with a function like error("")
called from hundreds of places, the difference between system.error and
sys.error is too big. sys.error and sys.exit have good vibes (at least
as good as the vibes can be for functions which error and exit.)
Note: this is just the first cut. I need to check this in to finish
fixing partest. I will be going over it with a comb and writing
documentation which will leave you enchanted, as well as removing other
bits which are now redundant or inferior. No review.
Diffstat (limited to 'src/detach/library')
-rw-r--r-- | src/detach/library/scala/remoting/Channel.scala | 6 | ||||
-rw-r--r-- | src/detach/library/scala/runtime/remoting/RegistryDelegate.scala | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/detach/library/scala/remoting/Channel.scala b/src/detach/library/scala/remoting/Channel.scala index ba3f3c31e0..541e45a477 100644 --- a/src/detach/library/scala/remoting/Channel.scala +++ b/src/detach/library/scala/remoting/Channel.scala @@ -51,7 +51,7 @@ class Channel protected (socket: Socket) { } catch { case e: Exception => - system.error("Class loader undefined: " + e.getMessage) + sys.error("Class loader undefined: " + e.getMessage) null } def classLoader: ClassLoader = cl @@ -82,7 +82,7 @@ class Channel protected (socket: Socket) { } catch { case e: IOException => - system.error("Input stream undefined: "+e.getMessage+" ("+this+")") + sys.error("Input stream undefined: "+e.getMessage+" ("+this+")") null } private lazy val out = @@ -91,7 +91,7 @@ class Channel protected (socket: Socket) { } catch { case e: IOException => - system.error("Output stream undefined: "+e.getMessage+" ("+this+")") + sys.error("Output stream undefined: "+e.getMessage+" ("+this+")") null } diff --git a/src/detach/library/scala/runtime/remoting/RegistryDelegate.scala b/src/detach/library/scala/runtime/remoting/RegistryDelegate.scala index baf4249bbe..814d50e910 100644 --- a/src/detach/library/scala/runtime/remoting/RegistryDelegate.scala +++ b/src/detach/library/scala/runtime/remoting/RegistryDelegate.scala @@ -62,7 +62,7 @@ import java.rmi.server.UnicastRemoteObject * Thread.sleep(Long.MAX_VALUE) * } <b>catch</b> { * <b>case</b> e: InterruptedException => // do nothing - * <b>case</b> e: Throwable => e.printStackTrace(); system.exit(1) + * <b>case</b> e: Throwable => e.printStackTrace(); sys.exit(1) * } * } while (<b>true</b>) * } @@ -115,14 +115,14 @@ object RMIDelegate { if (args.length > 0) { if (args(0) equals "-help") { println("Usage: rmidelegate <options> <port>") - system.exit(0) + sys.exit(0) } try { port = args(0).toInt } catch { case e: NumberFormatException => println("Usage: rmidelegate <options> <port>") - system.exit(1) + sys.exit(1) } val opts = args filter (_ startsWith "-J-D") for (opt <- opts) { @@ -149,7 +149,7 @@ object RMIDelegate { // do nothing case e: Throwable => e.printStackTrace() - system.exit(1) + sys.exit(1) } } while (true) } |