Cleanup BatchScriptRunner

This commit is contained in:
Dale Wijnand 2018-01-30 15:53:05 +00:00
parent b8abf4285f
commit cb2e4e67fd
No known key found for this signature in database
GPG Key ID: 4F256E3D151DF5EF
1 changed files with 2 additions and 3 deletions

View File

@ -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) {