made error an object

@johnnyman727 r?
You should do `var e = new Error(err)` to create the error outside the `setImmediate`. `new Error` captures the stack trace where it's called, and you want the stack trace of the caller; otherwise the stack trace will just say `setImmediate`.