mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2025-09-09 18:29:48 +02:00
Add new exceptions
This commit is contained in:
parent
ad137d6351
commit
1dcf13244d
3 changed files with 34 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue