I think a ``try/except`` with a friendly logging message would be nicer, in case the user gives a bad function.