function extendError (targetError, sourceError) {
extendStack(targetError, sourceError);
extend(targetError, sourceError);
}
Extends the targetError with the properties of the source error.

@param {Error}   targetError - The error object to extend
@param {?Error}  sourceError - The source error object, if any