Better error handling. Refs #7636.
Merge branch 'feature/7636_icat_publish' into develop