Wrapping the report in error reporting code