Added exception status code and message to examples.

This commit is contained in:
Erik C. Thauvin 2021-06-11 16:53:55 -07:00
parent 8f08fd738b
commit a704b955dc
5 changed files with 63 additions and 23 deletions

View file

@ -1,5 +1,5 @@
/*
* CryptoExtension.kt
* CryptoException.kt
*
* Copyright (c) 2021, Erik C. Thauvin (erik@thauvin.net)
* All rights reserved.
@ -37,7 +37,8 @@ package net.thauvin.erik.crypto
*/
@Suppress("unused")
class CryptoException : Exception {
var statusCode = NO_STATUS
var statusCode: Int
private set
/** Constructs a new exception with the specified status code, message and cause. */
constructor(statusCode: Int = NO_STATUS, message: String, cause: Throwable) : super(message, cause) {
@ -56,7 +57,6 @@ class CryptoException : Exception {
companion object {
const val NO_STATUS = -1
private const val serialVersionUID = 1L
}
}