external-sop: Fix error code mapping of new exceptions

This commit is contained in:
Paul Schaub 2023-04-18 17:58:47 +02:00
parent 42bd8f06a4
commit d53776dfc8
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 17 additions and 0 deletions

View file

@ -267,6 +267,14 @@ public class ExternalSOP implements SOP {
throw new SOPGPException.KeyCannotSign("External SOP backend reported error KeyCannotSign (" +
exitCode + "):\n" + errorMessage);
case SOPGPException.IncompatibleOptions.EXIT_CODE:
throw new SOPGPException.IncompatibleOptions("External SOP backend reported error IncompatibleOptions (" +
exitCode + "):\n" + errorMessage);
case SOPGPException.UnsupportedProfile.EXIT_CODE:
throw new SOPGPException.UnsupportedProfile("External SOP backend reported error UnsupportedProfile (" +
exitCode + "):\n" + errorMessage);
default:
throw new RuntimeException("External SOP backend reported unknown exit code (" +
exitCode + "):\n" + errorMessage);