PHP: Converting the errors from UAParse construct into a thrown Exception

Coming across some errors where we're using UAParser in our projects; when loading it automatically, if regexes.yaml/.json haven't been downloaded the whole project explodes. Being able to catch a thrown Exception would make things much easier for us and also reacts a bit better to any usage (other than just echoing out the issues).