More exceptions are thrown at cache creation for better debugging

When creating the cached class, I added some exception throws that helped me through debugging.

Feel free to refuse it if you don't think it will be really useful.