mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2024-12-22 21:07:57 +01:00
Add new exceptions
This commit is contained in:
parent
5f18edd2e7
commit
a07446e29a
3 changed files with 34 additions and 0 deletions
|
@ -38,6 +38,8 @@ usage.exitCodeList.19=83:Options were supplied that are incompatible with each o
|
|||
usage.exitCodeList.20=89:The requested profile is unsupported, or the indicated subcommand does not accept profiles
|
||||
usage.exitCodeList.21=97:The implementation supports some form of hardware-backed secret keys, but could not identify the hardware device
|
||||
usage.exitCodeList.22=101:The implementation tried to use a hardware-backed secret key, but the cryptographic hardware refused the operation for some reason other than a bad PIN or password
|
||||
usage.exitCodeList.23=103:The primary key of a KEYS object is too weak or revoked
|
||||
usage.exitCodeList.24=107:The CERTS object has no matching User ID
|
||||
|
||||
## SHARED RESOURCES
|
||||
stacktrace=Print stacktrace
|
||||
|
|
|
@ -38,6 +38,8 @@ usage.exitCodeList.19=83:Miteinander inkompatible Optionen spezifiziert
|
|||
usage.exitCodeList.20=89:Das angeforderte Profil wird nicht unterstützt, oder der angegebene Unterbefehl akzeptiert keine Profile
|
||||
usage.exitCodeList.21=97:Die Anwendung unterstützt hardwaregestützte private Schlüssel, aber kann das Gerät nicht identifizieren
|
||||
usage.exitCodeList.22=101:Die Anwendung versuchte, einen hardwaregestützten Schlüssel zu verwenden, aber das Gerät lehnte den Vorgang aus einem anderen Grund als einer falschen PIN oder einem falschen Passwort ab
|
||||
usage.exitCodeList.23=103:Der primäre private Schlüssel ist zu schwach oder widerrufen
|
||||
usage.exitCodeList.24=107:Das Zertifikat hat keine übereinstimmende User ID
|
||||
|
||||
## SHARED RESOURCES
|
||||
stacktrace=Stacktrace ausgeben
|
||||
|
|
|
@ -337,4 +337,34 @@ abstract class SOPGPException : RuntimeException {
|
|||
const val EXIT_CODE = 101
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The primary key of a KEYS object is too weak or revoked.
|
||||
*/
|
||||
class PrimaryKeyBad : SOPGPException {
|
||||
constructor() : super()
|
||||
|
||||
constructor(errorMsg: String) : super(errorMsg)
|
||||
|
||||
override fun getExitCode(): Int = EXIT_CODE
|
||||
|
||||
companion object {
|
||||
const val EXIT_CODE = 103
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The CERTS object has no matching User ID.
|
||||
*/
|
||||
class CertUserIdNoMatch : SOPGPException {
|
||||
constructor() : super()
|
||||
|
||||
constructor(errorMsg: String) : super(errorMsg)
|
||||
|
||||
override fun getExitCode(): Int = EXIT_CODE
|
||||
|
||||
companion object {
|
||||
const val EXIT_CODE = 107
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue