Connect++ 0.4.0
A fast, readable connection prover for first-order logic.
Loading...
Searching...
No Matches
Exceptions.cpp
1/*
2
3Copyright © 2023-24 Sean Holden. All rights reserved.
4
5*/
6/*
7
8This file is part of Connect++.
9
10Connect++ is free software: you can redistribute it and/or modify it
11under the terms of the GNU General Public License as published by the
12Free Software Foundation, either version 3 of the License, or (at your
13option) any later version.
14
15Connect++ is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18more details.
19
20You should have received a copy of the GNU General Public License along
21with Connect++. If not, see <https://www.gnu.org/licenses/>.
22
23*/
24
25#include "Exceptions.hpp"
26
27//--------------------------------------------------------------
28file_open_exception::file_open_exception(const std::string& s)
29: message() {
30 message += "Failed to open file: ";
31 message += s;
32}
33//--------------------------------------------------------------
34const char* file_open_exception::what() const noexcept {
35 return message.c_str();
36}
37//--------------------------------------------------------------
38file_read_exception::file_read_exception(const std::string& s)
39: message() {
40 message += "Failed to read file: ";
41 message += s;
42}
43//--------------------------------------------------------------
44const char* file_read_exception::what() const noexcept {
45 return message.c_str();
46}
47//--------------------------------------------------------------
48file_parse_exception::file_parse_exception(const std::string& s)
49: message() {
50 message += "Failed to parse file: ";
51 message += s;
52}
53//--------------------------------------------------------------
54const char* file_parse_exception::what() const noexcept {
55 return message.c_str();
56}