Error reporting system turned into a class instance for easy passing as a function parameter.