throw the correct type of exceptions from cache loading