add: exeption message

This commit is contained in:
Camille Chauvet 2023-09-03 11:23:21 +00:00
parent b074e28798
commit fc26d965f0
3 changed files with 14 additions and 4 deletions

View File

@ -68,12 +68,12 @@ void Bureaucrat::decrement()
const char* Bureaucrat::GradeTooLowException::what() const throw()
{
return "Too small grade";
return "Too low grade";
}
const char* Bureaucrat::GradeTooHighException::what() const throw()
{
return "Too big grade";
return "Too high grade";
}
std::ostream& operator<<(std::ostream &stream, Bureaucrat &src)

View File

@ -73,12 +73,12 @@ void Bureaucrat::signForm(Form& form) const
const char* Bureaucrat::GradeTooLowException::what() const throw()
{
return "Too small grade";
return "Too low grade";
}
const char* Bureaucrat::GradeTooHighException::what() const throw()
{
return "Too big grade";
return "Too high grade";
}
std::ostream& operator<<(std::ostream &stream, Bureaucrat &src)

View File

@ -81,3 +81,13 @@ std::ostream& operator<<(std::ostream& os, const Form& src)
return os;
}
const char* Bureaucrat::GradeTooLowException::what() const throw()
{
return "grade is to low";
}
const char* Bureaucrat::GradeTooHighException::what() const throw()
{
return "grade is to high";
}