-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExceptions.cpp
More file actions
26 lines (20 loc) · 998 Bytes
/
Copy pathExceptions.cpp
File metadata and controls
26 lines (20 loc) · 998 Bytes
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
#include "Exceptions.h"
ImageProcessorException::ImageProcessorException(const std::string &message) {
message_ = message;
}
const char *ImageProcessorException::what() const noexcept {
std::string *s = new std::string{base_message_ + message_};
return s->c_str();
}
OpeningFileException::OpeningFileException(const std::string &message) : ImageProcessorException(message) {
base_message_ = "Opening file exception with message: ";
}
ReadingFileException::ReadingFileException(const std::string &message) : ImageProcessorException(message) {
base_message_ = "Reading file exception with message: ";
}
ProgramArgumentsException::ProgramArgumentsException(const std::string &message) : ImageProcessorException(message) {
base_message_ = "Program arguments exception with message: ";
}
FilterParametersException::FilterParametersException(const std::string &message) : ImageProcessorException(message) {
base_message_ = "Filter parameters exception with message: ";
}