Hello.
Please tell me how to work with exceptions in PHP? I used to work with Python, and everything was just there:
try: ... except: ... My script receives the API data in the JSON object, I need to make a condition that will check if the json object returns nothing - wait 10 seconds and try again.
In Python, this was solved very easily:
try: url = "http://site.......... with urlopen(url) as response: ..... except: time.sleep(10) How to make such an exception in PHP, I do not fully understand.
I would be grateful for any help!