export on error mode

This commit is contained in:
Jindra Petřík
2024-01-20 23:51:10 +01:00
parent d1935d8e0e
commit 9b02e73e48
2 changed files with 27 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ import com.jpexs.decompiler.flash.cli.commands.types.ConfigConverter;
import com.jpexs.decompiler.flash.cli.commands.types.ExportObject;
import com.jpexs.decompiler.flash.cli.commands.types.ExportObjectFormat;
import com.jpexs.decompiler.flash.cli.commands.types.ExportObjectFormatConverter;
import com.jpexs.decompiler.flash.cli.commands.types.OnErrorMode;
import com.jpexs.decompiler.flash.cli.commands.types.Selection;
import com.jpexs.decompiler.flash.cli.commands.types.SelectionConverter;
import java.util.ArrayList;
@@ -97,6 +98,23 @@ public class Export implements Runnable {
)
private boolean useEmbed = false;
@Option(
names = "--on-error",
description = {
"Error handling mode.",
"@|bold Possible values|@:",
" @|bold abort|@ - stops exporting",
" @|bold retry|@ - retries exporting (see --num-retries option)",
" @|bold ignore|@ - ignores current file"
}
)
private OnErrorMode onError = OnErrorMode.abort;
@Option(
names = "--num-retries",
description = "Number of retries for option --on-error=retry. Default is 3."
)
private int numRetries = 3;
@Parameters(index = "0",

View File

@@ -0,0 +1,9 @@
package com.jpexs.decompiler.flash.cli.commands.types;
/**
*
* @author JPEXS
*/
public enum OnErrorMode {
abort, retry, ignore
}