Update promise.js

made errorlogging only for rejected Error instances