Log only when logger is set; fixes tests
Remove trailing whitespace
Include response and body in error object

The error object should include all information relevant to the
error. This makes debugging clients to remote web services easier with
promise libraries, such as Q [1]. Example usage:

  var Q = require('q');
  var soap = require('soap');

  var serviceUrl = // ...
  var methodArgs = // ...

  Q.nfcall(soap.createClient, serviceUrl)
    .then(function(client) {
      return Q.nfcall(client.Method, methodArgs);
    })
    .then(
      function(result) { console.log(result); },
      function(err) {
        console.error(err);  // response and body available in err
      }
    );

[1] https://github.com/kriskowal/q
Merge pull request #166 from tkareine/include-response-and-body-in-err-object

Include response and body in err object