Java return value (in try/catch clause)

后端 未结 6 390
生来不讨喜
生来不讨喜 2021-01-12 17:25

everyone. I have a rookie question about the returning value in java. Here\'s my code.

@Override
public long addDrugTreatment(long id, String diagnosis, Stri         


        
6条回答
  •  自闭症患者
    2021-01-12 17:56

    catch (JMSException e) {
            logger.severe("JMS Error: " + e);
            //You need to throw exception here or return something
            //better would be throw new Exception("JMS Error: " + e);
        }
    

提交回复
热议问题