JC-1497 Added displaying error messages. Added tests.
Merge remote-tracking branch 'origin/master'