mirror of
https://github.com/TanelOrumaa/Estonian-ID-card-mobile-authenticator-POC.git
synced 2024-12-22 20:40:16 +02:00
Added basic notifications to the user
For when exceptions occur when communicating with the ID-card
This commit is contained in:
parent
60207319b7
commit
6ddfe9af46
@ -0,0 +1,10 @@
|
||||
package com.tarkvaraprojekt.mobileauthapp.auth
|
||||
|
||||
/**
|
||||
* A specialised RuntimeException class for exceptions related to the mobile authentication app.
|
||||
* Possible error codes can be found at
|
||||
* https://github.com/TanelOrumaa/Estonian-ID-card-mobile-authenticator-POC/wiki/Error-codes
|
||||
* @param message Error message
|
||||
* @param code An error code defined in the project wiki
|
||||
*/
|
||||
open class AuthAppException(message: String, var code: Int) : RuntimeException(message)
|
@ -0,0 +1,7 @@
|
||||
package com.tarkvaraprojekt.mobileauthapp.auth
|
||||
|
||||
/**
|
||||
* An AuthAppException for when the user entered CAN does not match the one read from the ID-card
|
||||
* @see AuthAppException
|
||||
*/
|
||||
class InvalidCANException : AuthAppException("Invalid CAN", 400)
|
Loading…
Reference in New Issue
Block a user