I would suggest to use the not found exception here.

Also please use an exception per variable so it is clear, which one is missing for the developer using the library.