palimpsest v3.0.0
Loading...
Searching...
No Matches
TypeError.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2022 Stéphane Caron
3
4#pragma once
5
6#include <string>
7
9
10namespace palimpsest::exceptions {
11
13class TypeError : public PalimpsestError {
14 public:
21 TypeError(const std::string& file, unsigned line, const std::string& message)
22 : PalimpsestError(file, line, message) {}
23
29 TypeError(const TypeError& other, const std::string& extra_message)
30 : PalimpsestError(other, extra_message) {}
31
33 ~TypeError() throw() {}
34};
35
36} // namespace palimpsest::exceptions
Error with file and line references to the calling code.
Requested type doesn't match the one already in the dictionary.
Definition: TypeError.h:13
TypeError(const TypeError &other, const std::string &extra_message)
Copy an existing error, adding to the error message.
Definition: TypeError.h:29
~TypeError()
Empty destructor.
Definition: TypeError.h:33
TypeError(const std::string &file, unsigned line, const std::string &message)
Create a type error.
Definition: TypeError.h:21
Exceptions raised by the library.
Definition: KeyError.h:10