Improved error reporting based on recent tests
Authored by: philsp 2020-01-24
Parent: [r5493]
Child: [r5495]