Add. `category` method to error object.