Raise an exception instead of printing a warning.