Error reporting

I suggest implementation of: