school/semester_2/programiranje_2/naloga1102/UnparseableDateException.cpp

22 lines
474 B
C++

//
// Created by Nik on 20/05/2022.
//
#include "UnparseableDateException.h"
UnparseableDateException::UnparseableDateException(std::string message) : message(message){}
const char* UnparseableDateException::what() const noexcept {
std::string ret = "Unparseable date: " + message;
char* c = const_cast<char *>(ret.c_str());
return c;
}
std::string UnparseableDateException::toString() {
return "Unparseable date: " + message;
}