mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 16:03:15 +00:00
失敗したときにログを削除してリカバリするように
This commit is contained in:
parent
113bca723f
commit
6b3d0c0dae
|
@ -76,16 +76,22 @@ public class DocumentProcessorImpl implements DocumentProcessor{
|
|||
|
||||
lacertaVcs.insertPage(this.documentDetail.getPages().size(), filename);
|
||||
|
||||
Page page = new Page();
|
||||
page.setFileName(filename);
|
||||
page.setBitmap(bitmap);
|
||||
this.documentDetail.getPages().add(page);
|
||||
try {
|
||||
Page page = new Page();
|
||||
page.setFileName(filename);
|
||||
page.setBitmap(bitmap);
|
||||
this.documentDetail.getPages().add(page);
|
||||
|
||||
this.fileManager.getNewInstance().createDirectoryIfNotExist(DEFAULT_SAVE_DIR).resolve(DEFAULT_SAVE_DIR).saveBitmap(bitmap, filename);
|
||||
|
||||
logger.info("addNewPageToLast", "finished");
|
||||
logger.info("addNewPageToLast", "filename: " + filename);
|
||||
this.fileManager.getNewInstance().createDirectoryIfNotExist(DEFAULT_SAVE_DIR).resolve(DEFAULT_SAVE_DIR).saveBitmap(bitmap, filename);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user