Throw deprecation error, rather than string