I'm a little curious to this exception when being thrown.
public void addDailyUVReport(DailyUVReport report)
{
counter++;
if (counter > CAPACITY)
throw new BackingStoreException("Called too many times");
}
How come that doesn't work? But... this does.
public void addDailyUVReport(DailyUVReport report) throws BackingStoreException
{
counter++;
if (counter > CAPACITY)
throw new BackingStoreException("Called too many times");
}
I know when you throw an IndexOutOfBoundsException() you do not need the throw clause? and can just create a new one without having the clause with the method. Would it have to do with it being void?