aboutsummaryrefslogtreecommitdiff
path: root/InvalidSlotException.h
blob: 741d53e4619e40260a6b8f450a4080123b75c080 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//
// Created by sz on 09.08.16.
//

#ifndef LIBNITROKEY_INVALIDSLOTEXCEPTION_H
#define LIBNITROKEY_INVALIDSLOTEXCEPTION_H


#include <cstdint>
#include <string>
#include <exception>

class InvalidSlotException : public std::exception {
public:
    static const std::uint8_t exception_id = 201;

    uint8_t slot_selected;

    InvalidSlotException(uint8_t slot_selected) : slot_selected(slot_selected) {}

    virtual const char *what() const throw() {
        return "Wrong slot selected";
    }

};

#endif //LIBNITROKEY_INVALIDSLOTEXCEPTION_H