C++ Device API Reference Manual
Reference documentation for the Simics C++ Device API.
 
Loading...
Searching...
No Matches
attribute-exceptions.h
Go to the documentation of this file.
1// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2023 Intel Corporation
5
6 This software and the related documents are Intel copyrighted materials, and
7 your use of them is governed by the express license under which they were
8 provided to you ("License"). Unless the License provides otherwise, you may
9 not use, modify, copy, publish, distribute, disclose or transmit this software
10 or the related documents without Intel's prior written permission.
11
12 This software and the related documents are provided as is, with no express or
13 implied warranties, other than those that are expressly stated in the License.
14*/
15
16#ifndef SIMICS_DETAIL_ATTRIBUTE_EXCEPTIONS_H
17#define SIMICS_DETAIL_ATTRIBUTE_EXCEPTIONS_H
18
19#include <exception>
20#include <string>
21
22namespace simics {
23namespace detail {
24
25class SetInterfaceNotFound : public std::exception {
26 public:
27 explicit SetInterfaceNotFound(const std::string &msg)
28 : msg_(msg) {}
29
30 const char *what() const noexcept override {
31 return msg_.c_str();
32 }
33
34 private:
35 std::string msg_;
36};
37
38class SetIllegalType : public std::exception {
39 public:
40 explicit SetIllegalType(const std::string &msg)
41 : msg_(msg) {}
42
43 const char *what() const noexcept override {
44 return msg_.c_str();
45 }
46
47 private:
48 std::string msg_;
49};
50
51class SetIllegalValue : public std::exception {
52 public:
53 explicit SetIllegalValue(const std::string &msg)
54 : msg_(msg) {}
55
56 const char *what() const noexcept override {
57 return msg_.c_str();
58 }
59
60 private:
61 std::string msg_;
62};
63
64class SetNotWritable : public std::exception {
65 public:
66 explicit SetNotWritable(const std::string &msg)
67 : msg_(msg) {}
68
69 const char *what() const noexcept override {
70 return msg_.c_str();
71 }
72
73 private:
74 std::string msg_;
75};
76
77} // namespace detail
78} // namespace simics
79
80#endif
Definition: attribute-exceptions.h:38
const char * what() const noexcept override
Definition: attribute-exceptions.h:43
SetIllegalType(const std::string &msg)
Definition: attribute-exceptions.h:40
Definition: attribute-exceptions.h:51
const char * what() const noexcept override
Definition: attribute-exceptions.h:56
SetIllegalValue(const std::string &msg)
Definition: attribute-exceptions.h:53
Definition: attribute-exceptions.h:25
const char * what() const noexcept override
Definition: attribute-exceptions.h:30
SetInterfaceNotFound(const std::string &msg)
Definition: attribute-exceptions.h:27
Definition: attribute-exceptions.h:64
SetNotWritable(const std::string &msg)
Definition: attribute-exceptions.h:66
const char * what() const noexcept override
Definition: attribute-exceptions.h:69
Definition: after-bank.h:33