java - Is it okay for constructors to throw runtime exceptions? -


When a constructor is disconnected from the methods examined, which can not handle the constructor, OK to throw out as a runtime exception, if you have a confirmation that this app can not handle it and will be useless without creating the object?

Yes, in many constructors they are indispensable when they call other methods because always a possibility That they will throw an unsolicited exception in advance.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -