Hi all, A couple of us have been having our own 'checked vs unchecked exceptions' debate on the IRC #dspace channel so I thought I would widen the audience to get some more opinions.
I just changed DCDate to thow a checked exception if it is fed an invalid parameter eg 31st February. There are currently two places that call the code and hence now have to deal with the exception - DescribeStep and InstallItem. A checked exception seems the right thing in DescribeStep as you want to know about the problem and return an error message to the user, but in InstallItem you know the parameters will be valid because they are generated using java.util.Date rather then being user entered, so it's clumsy to have to catch an exception you know will never be thrown. So the questions is, should the exception be checked or unchecked in this case ? Any comments welcome. Thanks, Robin. Robin Taylor Main Library University of Edinburgh Tel. 0131 6513808 -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. ------------------------------------------------------------------------------ Achieve Improved Network Security with IP and DNS Reputation. Defend against bad network traffic, including botnets, malware, phishing sites, and compromised hosts - saving your company time, money, and embarrassment. Learn More! http://p.sf.net/sfu/hpdev2dev-nov _______________________________________________ Dspace-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dspace-devel
