Added some exception handling

This commit is contained in:
2020-08-24 14:27:48 -04:00
parent fe80d93bdf
commit 9eb1539c07
3 changed files with 20 additions and 7 deletions

View File

@@ -123,9 +123,9 @@ namespace mee{
goalNumber /= goalNumber;
}
//TODO: If for some reason the goalNumber is not 1 throw an error
//If for some reason the goalNumber is not 1 throw an exception
if(goalNumber != 1){
throw new mee.Exceptions.InvalidResult("Factor did not end as 1");
}
//Return the list of factors
@@ -157,9 +157,9 @@ namespace mee{
goalNumber /= goalNumber;
}
//TODO: If for some reason the goalNumber is not 1 throw an error
//If for some reason the goalNumber is not 1 throw an exception
if(goalNumber != 1){
throw new mee.Exceptions.InvalidResult("Factor did not end as 1");
}
//Return the list of factors
@@ -191,9 +191,9 @@ namespace mee{
goalNumber /= goalNumber;
}
//TODO: If for some reason the goalNumber is not 1 throw an error
//If for some reason the goalNumber is not 1 throw an exception
if(goalNumber != 1){
throw new mee.Exceptions.InvalidResult("Factor did not end as 1");
}
//Return the list of factors