This is not a good idea, to use exceptions for flow control. It's better to check first whether the class has a constructor we need.