When attempting to access a collection that does not exist, PHP throws an uncaught error shown below:
</b>Fatal error:</b> Uncaught exception 'UnQLite\Exception' with message 'unable to init UnQLite\Doc' in ...:30
stack trace:
#0 /.../*.php(30): UnQLite\DB->doc('nonExistentCollection')
#1 {main}
Is there any method to determine if a collection exists before trying to access the collection? Or can you instead return an error if the collection does not exist?
When attempting to access a collection that does not exist, PHP throws an uncaught error shown below:
Is there any method to determine if a collection exists before trying to access the collection? Or can you instead return an error if the collection does not exist?