Return reject on error
Merge pull request #25 from quaertym/patch-5

Call resolve when there is no error in compile