forked from j62/ctbrec
1
0
Fork 0

Add logging for unexpected errors

This commit is contained in:
0xboobface 2019-04-21 15:05:13 +02:00
parent 88a6ab3a91
commit ee3ae3ef43
1 changed files with 2 additions and 0 deletions

View File

@ -68,6 +68,8 @@ public class PlaylistGenerator {
} catch(Exception e) {
LOG.warn("Couldn't determine duration for {}. Skipping this file.", file.getName());
file.renameTo(new File(directory, file.getName()+".corrupt"));
} catch(Throwable t) {
LOG.error("Unexpected error", t);
}
done++;
double percentage = (double)done / (double) total;