Jump to content
xisto Community
Sign in to follow this  
dark

Getting Rid Of Errors

Recommended Posts

HiIs it ok to use error-reporting(0) locally in a snippet of code that spits an undefined variable error?I found that fix and was wondering what does everybody do about error messages that keep poping up.ThanksPatrick

Share this post


Link to post
Share on other sites

my scripts don't have error messages... try to find out what's wrong and fix it. or try to do it a different way. there is always more than one way to do something in programming.

Share this post


Link to post
Share on other sites

Turnning off the error reporting function can sometimes make it hard to track the errors.. So debugging becomes extremely difficult. You can use an include file on top to set this option for all the files. So while you are debugging you can temporarily disable it.The other option which you have is using the "@" symbol. If you preceed any function with it, the errors are suppressed but they are limited to that line of code only.

Share this post


Link to post
Share on other sites

HiThis is the original poster. Thanks so much for the kind answers and the @ tip, I am going to try to use it asap.While browsing the web for answers to my problem, I came upon a snippet of code that showed how a variable that sometimes isn't defined creates an error with the parser. So including this variable code in an IF statement would prevent the error also.Like someone said above, there are several solutions to fix that.Thanks againPatrick

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.