what do you guys think about throwing exceptions in java vs returning a null or boolean value to know if the procedure passed or failed?
to keep my code neater I've done stuff like this
if(!doSomething(withBob)) {
return; //Whoops doSomething failed, guess we can't continue
}
saves space vs
try {
doSomething(withBob)
} catch (InputInvalidException e) {
return;
}
to keep my code neater I've done stuff like this
if(!doSomething(withBob)) {
return; //Whoops doSomething failed, guess we can't continue
}
saves space vs
try {
doSomething(withBob)
} catch (InputInvalidException e) {
return;
}