Allow error function to be a callable method of an instantiated object