Cleanup BatchScriptRunner

This commit is contained in:
Dale Wijnand
2018-03-06 11:54:13 +00:00
parent b8abf4285f
commit cb2e4e67fd
@@ -43,9 +43,8 @@ private[sbt] class BatchScriptRunner extends ScriptRunner {
def processStatement(handler: StatementHandler, statement: Statement, states: States): Unit = {
val state = states(handler).asInstanceOf[handler.State]
val nextState =
try { Right(handler(statement.command, statement.arguments, state)) } catch {
case e: Exception => Left(e)
}
try Right(handler(statement.command, statement.arguments, state))
catch { case e: Exception => Left(e) }
nextState match {
case Left(err) =>
if (statement.successExpected) {