Hello Ranchers,
I have a simple question. Is it an impropper coding standard to throw exceptions on a classes property set? for instance, I have a class ConfigurationFile that takes setting database location, port number, and IP address from the configuration screen through a property setProperties which in turn calls a private member save that creates the system.properties file if necessary and writes to it. In doing so, the operation must be encapulated in try catch blocks, so save throws a windowException and in turn so does setProperties. If there is a problem on saving the settings, the config screen catches the exception on calling the configurations setProperties and displays the exception to the user via JOptionPane.
Now this all works fine in
Java I know but is right to have a set property throwing an exception. Please understand if this question is somewhat dim
, but I am almost a begginer at Java development.
many thanks