       stdout: (line) -> console.log line
       stderr: (line) -> console.log line
       exit: (code) ->
-        throw "git checkout exit: #{code}" unless code is 0
+        throw Error("git checkout exit: #{code}") unless code is 0
         callback()
     })
 

        if code is 0
          callback()
        else
          throw "git add failed: exit code #{code}"
    })

      console.log("git status error: #{line}")

    exitHandler = (code) ->
      throw new Error("git status exit: #{code}") unless code is 0
      handler(conflicts)

    @process({
