Added test and implementation for custom error message reporting

see #95