Skip to content

Improve exception handling#1

Merged
BaseMax merged 2 commits intoBaseMax:mainfrom
IzzySoft:exhandle
Dec 5, 2020
Merged

Improve exception handling#1
BaseMax merged 2 commits intoBaseMax:mainfrom
IzzySoft:exhandle

Conversation

@IzzySoft
Copy link
Copy Markdown
Contributor

@IzzySoft IzzySoft commented Dec 4, 2020

Two commits, in case you wish to cherry-pick:

  • 5a07c85 simply "hides" the PHP Warning on a 404 if an app is not found, and directly returns an empty array
  • df9bb95 introduces two new array keys and applies them where appropriate:
    • success: set to 1 if data was successfully retrieved, including all other keys as before
    • message: only added if success==0, giving details on what failed

I was tempted to add a third commit with some cleanup – but knowing my own code I thought you might wish to keep the "notes" 😉

PS: Would love if summary and featureGraphic could be extracted as well, but it seems those are not contained in the scraped page. But if you wish I can check my old scraper for additional details like price, votes etc – just let me know.

@BaseMax
Copy link
Copy Markdown
Owner

BaseMax commented Dec 5, 2020

Good idea.
Merged, Thank you. 👍

@BaseMax BaseMax merged commit 901fca2 into BaseMax:main Dec 5, 2020
@IzzySoft IzzySoft deleted the exhandle branch December 5, 2020 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants