clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r1538343 - in /clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting: BundleFS.scala CompilerService.scala ScriptEngineFactory.scala TrackingCompiler.scala util/FileWrapper.scala
Date Sun, 03 Nov 2013 11:58:06 GMT
Author: reto
Date: Sun Nov  3 11:58:06 2013
New Revision: 1538343

URL: http://svn.apache.org/r1538343
Log:
CLEREZZA-840: cleaned up things

Modified:
    clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/BundleFS.scala
    clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/CompilerService.scala
    clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/ScriptEngineFactory.scala
    clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/TrackingCompiler.scala
    clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/FileWrapper.scala

Modified: clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/BundleFS.scala
URL: http://svn.apache.org/viewvc/clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/BundleFS.scala?rev=1538343&r1=1538342&r2=1538343&view=diff
==============================================================================
--- clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/BundleFS.scala
(original)
+++ clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/BundleFS.scala
Sun Nov  3 11:58:06 2013
@@ -61,7 +61,7 @@ package org.apache.clerezza.scala.script
 				 */
 				def lastModified: Long =
 					try { url.openConnection.getLastModified }
-				catch { case _ => 0 }
+				catch { case _: Exception => 0 }
 
 				@throws(classOf[IOException])
 				def container: AbstractFile =

Modified: clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/CompilerService.scala
URL: http://svn.apache.org/viewvc/clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/CompilerService.scala?rev=1538343&r1=1538342&r2=1538343&view=diff
==============================================================================
--- clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/CompilerService.scala
(original)
+++ clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/CompilerService.scala
Sun Nov  3 11:58:06 2013
@@ -45,8 +45,9 @@ import java.io.PrintWriter
 import java.io.Reader
 import java.net._
 
-class CompileErrorsException(message: String) extends Exception(message) {
-	def this() = this(null)
+class CompileErrorsException(message: String, cause: Exception) extends Exception(message,
cause) {
+	def this(cause: Exception) = this(null, cause)
+        def this() = this(null)
 }
 
 class CompilePermission extends Permission("Compile Permssion") {
@@ -118,9 +119,11 @@ class CompilerService() extends BundleLi
 							try {
 								sharedCompiler.compile(sources)
 							} catch {
-								case c: CompileErrorsException => throw new CompileErrorsException(
-										new String(baos.toByteArray, "utf-8"))
-								case e => throw e
+								case c: CompileErrorsException => {           
+                                                                    throw new CompileErrorsException(
+										new String(baos.toByteArray, "utf-8"), c)
+                                                                }
+								case e: Exception => throw e
 							} finally {
 								currentSharedCompilerOutputStream = null
 							}
@@ -128,7 +131,7 @@ class CompilerService() extends BundleLi
 					})
 			} catch {
 				case e: PrivilegedActionException => throw e.getCause
-				case e => throw e
+				case e: Exception => throw e
 			}
 		}
 	}
@@ -154,8 +157,8 @@ class CompilerService() extends BundleLi
 							try {
 								compiler.compile(sources)
 							} catch {
-								case c: CompileErrorsException => throw new CompileErrorsException(new String(out.toByteArray,
"utf-8"))
-								case e => throw e
+								case c: CompileErrorsException => throw new CompileErrorsException(new String(out.toByteArray,
"utf-8"), c)
+								case e: Exception => throw e
 							}
 						}
 					})
@@ -176,8 +179,8 @@ class CompilerService() extends BundleLi
 							try {
 								compiler.compileToDir(sources)
 							} catch {
-								case c: CompileErrorsException => throw new CompileErrorsException(new String(out.toByteArray,
"utf-8"))
-								case e => throw e
+								case c: CompileErrorsException => throw new CompileErrorsException(new String(out.toByteArray,
"utf-8"), c)
+								case e: Exception => throw e
 							}
 						}
 					})

Modified: clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/ScriptEngineFactory.scala
URL: http://svn.apache.org/viewvc/clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/ScriptEngineFactory.scala?rev=1538343&r1=1538342&r2=1538343&view=diff
==============================================================================
--- clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/ScriptEngineFactory.scala
(original)
+++ clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/ScriptEngineFactory.scala
Sun Nov  3 11:58:06 2013
@@ -169,7 +169,7 @@ class ScriptEngineFactory() extends  Jav
 								}
 								sender ! interpreter.valueOfTerm("zzScriptResult")
 							} catch {
-								case e => sender ! ScriptEngineFactory.ActorException(e)
+								case e: Exception => sender ! ScriptEngineFactory.ActorException(e)
 							}
 						}
 						case ScriptEngineFactory.RefreshInterpreter => {

Modified: clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/TrackingCompiler.scala
URL: http://svn.apache.org/viewvc/clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/TrackingCompiler.scala?rev=1538343&r1=1538342&r2=1538343&view=diff
==============================================================================
--- clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/TrackingCompiler.scala
(original)
+++ clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/TrackingCompiler.scala
Sun Nov  3 11:58:06 2013
@@ -20,8 +20,6 @@
 package org.apache.clerezza.scala.scripting
 
 
-import org.apache.clerezza.scala.scripting.util.FileWrapper
-import org.apache.clerezza.scala.scripting.util.GenericFileWrapperTrait
 import org.apache.clerezza.scala.scripting.util.SplittingDirectory
 import org.apache.clerezza.scala.scripting.util.VirtualDirectoryWrapper
 import org.osgi.framework.BundleContext
@@ -32,8 +30,8 @@ import scala.tools.nsc.io.AbstractFile
 import scala.tools.nsc.io.VirtualDirectory
 import scala.tools.nsc.reporters.ConsoleReporter
 import scala.tools.nsc.reporters.Reporter
-import scala.tools.nsc.util._
-import java.io.ByteArrayOutputStream
+import scala.reflect.internal.util.SourceFile
+import scala.reflect.internal.util.BatchSourceFile
 import java.io.PrintWriter
 import java.net._
 

Modified: clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/FileWrapper.scala
URL: http://svn.apache.org/viewvc/clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/FileWrapper.scala?rev=1538343&r1=1538342&r2=1538343&view=diff
==============================================================================
--- clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/FileWrapper.scala
(original)
+++ clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/FileWrapper.scala
Sun Nov  3 11:58:06 2013
@@ -30,7 +30,7 @@ import scala.tools.nsc.io.AbstractFile
 
 class FileWrapper(val wrapped: AbstractFile, val childWrapper: (AbstractFile) => AbstractFile)
extends AbstractFile with GenericFileWrapperTrait {
 
-	/** overriding this hgere rather than in the trait as this is a var in VirtualDirectory
+	/** overriding this here rather than in the trait as this is a var in VirtualDirectory
 	*/
 	def lastModified = {
 		wrapped.lastModified
@@ -41,7 +41,7 @@ class FileWrapper(val wrapped: AbstractF
 		try {
 			super.unsupported(msg)
 		} catch {
-			case e => e.printStackTrace(); throw e
+			case e: Exception => e.printStackTrace(); throw e
 		}
 	}
 }



Mime
View raw message