Added a convenient way to report errors.