Added some exception handling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user