Log stack trace in generic pipeline error handler when available.
When formatting an error in the default error handler, include any properties set on the original Error object. Also misc. code cleanup.
Merge pull request #1 from cappslock/master

Log stack trace for errors.
When formatting an error in the default error handler, include any properties set on the original Error object.