Draft attempt at PDE-friendly error-handling and reporting.