You should use a more specific exception class here, maybe even an exception class created explicitly for this.