I am consuming a method of a legacy system that generates scanning of some FTP directories and searching for files. However, if it accesses a directory that does not have files, it throws an exception. Is there any way I can use this method, but ignore it if it generates this exception? (without changing the original method)