Error reporting for diagnostics