Is it in any way beneficial to return a value after throwing an exception? If not, can the return statement be left out and is it somehow possible to remove compiler error C4715: not all control paths return a value?
Thanks in advance.
Edit: (sample code)
for (ushort i = 0; i < itsNumUnits; ++i)
if (unitFormation[i] == unit)
{
return unitSetup[i];
}
else
throw unit;
return 0;