Continue executing loop after catching an exception in try/catch

前端 未结 3 2021
太阳男子
太阳男子 2021-01-17 23:54

Once an exception is caught in this code, the menuSystem method is run, but once I go to input a number the programme closes and the \"Build is successful\" mes

3条回答
  •  被撕碎了的回忆
    2021-01-18 00:48

    Another way you can do it:

       List directories;
       ...
       for ( File f : directories ) {
            try {
                processFolder(f);
            } catch( Exception e ) {
                SimpleLog.write(e);
            }
        }
    

提交回复
热议问题