Added support for errors (other then exceptions),
Merge origin/master