Exception handling and java doc