               rval = fn( arg )
               if rval instanceof EventChannel
                 rval.on "success", success
-                rval.on "error", error
+                rval.on "error", (error) ->
+                  record_error name, error
               else
                 success rval
             catch _error
-              error _error
+              record_error name, _error
       _fn( arg )
       events
 

          catch error
            events.emit "error", error
        else
          events.emit "success", arg
      _fn( arg )
      return events


              _error = new Error "concurrently: unable to complete"
              _error.errors = errors
              events.emit "error", _error
        record_error = (name, _error) ->
          if name
            errors[name] = _error
          else
            errors.unnamed_actions ||= []
            errors.unnamed_actions.push _error
          finish()
        return arg if functions.length is 0
        for [name, fn] in functions
