Allow returning of error code in fail message.

Hey, that's what we were talking about. This small modification allows to return error code in failure message, which could be useful in some cases.