Switching to throwing an exception instead of just returning