失敗したときにログを削除してリカバリするように

This commit is contained in:
r-ca 2024-01-24 18:36:08 +09:00
parent 113bca723f
commit 6b3d0c0dae
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -76,6 +76,7 @@ public class DocumentProcessorImpl implements DocumentProcessor{
lacertaVcs.insertPage(this.documentDetail.getPages().size(), filename);
try {
Page page = new Page();
page.setFileName(filename);
page.setBitmap(bitmap);
@ -85,7 +86,12 @@ public class DocumentProcessorImpl implements DocumentProcessor{
logger.info("addNewPageToLast", "finished");
logger.info("addNewPageToLast", "filename: " + filename);
} catch (Exception e) {
logger.error("addNewPageToLast", "failed: Unknown error");
logger.e_code("d9191286-6092-40b3-80ed-9239106a8c65");
// Recover (Undo latest action)
lacertaVcs.undo();
}
return this;
}