Changed exception to Unsolved to fit with naming convention

This commit is contained in:
2020-07-19 13:23:57 -04:00
parent 0caa043b59
commit 22871b71e9
33 changed files with 112 additions and 104 deletions

View File

@@ -89,7 +89,7 @@ void Problem4::reset(){
std::string Problem4::getString() const{
//If the problem hasn't been solved throw an exception
if(!solved){
throw unsolved();
throw Unsolved();
}
//Print the results
std::stringstream results;
@@ -101,7 +101,7 @@ std::string Problem4::getString() const{
std::vector<uint64_t> Problem4::getPalindromes() const{
//If the problem hasn't been solved throw an exception
if(!solved){
throw unsolved();
throw Unsolved();
}
return palindromes;
}
@@ -110,7 +110,7 @@ std::vector<uint64_t> Problem4::getPalindromes() const{
uint64_t Problem4::getLargestPalindrome() const{
//If the problem hasn't been solved throw an exception
if(!solved){
throw unsolved();
throw Unsolved();
}
return *(palindromes.end() - 1);
}