YAFLogo

johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
11 years ago
Is it possible to put all third party code in try and catch block. This way if they change API in future, it would not stop YAF from working.

Here are the third party code I know:

1. Detecting blogspam/bots

2. GeoLocation

3. FB login

4. Twitter login

5. Google login

The first two are important. For first one if API is changed, users may not be able to post at all. For second one, if API is changed, user may not be able to register to the site. System could be redirecting to default error page without try and catch block.

Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
11 years ago

Is it possible to put all third party code in try and catch block. This way if they change API in future, it would not stop YAF from working.

Originally Posted by: johnk 

Yes this is already done. Everything will also be logged in the event log.

johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
11 years ago
In /pages/register.ascx.cs

Line 590 - 630: I noticed they are not currently in try and catch block.

If they change variable name (cityname to city, regionname to region, etc) in future, the registration page would not load.

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
11 years ago

In /pages/register.ascx.cs

Line 590 - 630: I noticed they are not currently in try and catch block.

If they change variable name (cityname to city, regionname to region, etc) in future, the registration page would not load.

Originally Posted by: johnk 

i added checks if the columns exists, add some point the code should be rewritten to json to make it easier to handle this. But now it should always work.