It would be better to throw a more information exception - e.g., see the throw in line 2655 above.