Core: custom error message rendering. Implement #1223.