How error handling is being handled by PHP?

Go down

How error handling is being handled by PHP?

Post by Admin on Tue Feb 17, 2015 12:17 pm



Error handling is very important in every programming language. PHP uses the trigger to print the error in a program. The example statement is given below:
If ($height_of_door > $height_of_house)
{ trigger_error(“Impossible condition”,E_USER_ERROR); }
The E_USER_ERROR in the statement tells PHP that the condition is an error. Impossible condition is a string message which is displayed when an error is encountered. If the condition comes out to be true then the following message is displayed:
Fatal error: Impossible condition
E_USER_WARNING or E_USER_NOTICE can be used instead of E_USER_ERROR, to have PHP treat the condition as a warning or notice. Own statements can be written to perform error handling actions such as send a message, log a message or stop the script. For example:
If ($height_of_door > $height_of_house)
{
echo “This is impossible<br>”;
exit();
}
If $height_of_door is larger than $height_of_house, the message is echoed, and exit() stops the script.
Die statement can be used to display an error message when a function fails.

Admin
Admin

Posts : 501
Join date : 2015-02-07

View user profile http://seo-expert.editboard.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum
SEO Forum,Dofollow Forum,High PR Forum,startwithclck,Submit a guest post,Best 5 Google Adsense Alternatives for bloggers,Most Common Advantages & Disadvantages of Guest Blogging,Apply These 12 Secret Techniques To Improve On page Seo Factor,Bluehost Review: Shared Hosting for WordPress,Bluehost Review,Bluehost Reviews,bluehost hosting,godaddy, godaddy hosting, godaddy hosting review,godaddy review, godaddy coupons, godaddy promo code, godaddy coupon, godaddy promo codes, godaddy coupon code, IT Company indiaIT Company SuratIT Company MumbaiIT Company PuneIT CompanyIT Companies indiaIT Companies SuratIT Companies MumbaiIT Companies PuneIT Companies SEO Company indiaSEO Company SuratSEO Company MumbaiSEO Company PuneSEO CompanySEO Companies indiaSEO Companies SuratSEO Companies MumbaiSEO Companies PuneSEO Companies AhmedabadSEO CompaniesDigital Marketing CompanyDigital Marketing Company indiaDigital Marketing Company SuratDigital Marketing Company MumbaiDigital Marketing Company PuneDigital Marketing CompaniesDigital Marketing Companies indiaAffordable Search Engine Optimization Companysearch engine optimisation companiessearch engine optimisation companySeo marketing CompanyIndian SEO CompanyCheap seo companies Best seo companies Seo marketing companiesIndian SEO companiesCheap seo CompanyBest seo CompanyWebsite Optimization CompaniesWebsite Optimization CompanySeo optimization companySeo optimization Companiesdigital marketing agencySeo consultantSeo consultantsSeo consultingSeo consultancySearch engine optimization expertsSeo agencySeo indiaInternet marketing companyTop seo companySeo ServicesAffordable Search Engine Optimization servicesSeo marketing servicesSearch engine optimization and marketingCheap seo serviceBest seo service Cheap seo services Best seo services Digital marketing serviceDigital marketing servicesSeo analysisSeo strategySearch engine optimisation servicesProfessional seo servicesService seoOrganic seo servicesGuaranteed seo servicesMonthly seo servicesServices seoSearch marketing strategyLocal seo servicesLocal seo serviceProfessional seo servicesLocal seo services companySeo company servicesTop local seo companiesTop local seoTop local seo companyLocal seo agencyLocal seo agenciesLocal seo consultantLocal search engine optimisationLocal online marketingLocal search engine marketingSEO trainingSEO training SuratSEO training NavsariSEO training ValsadSEO training AnkleshwarSEO training BharuchInternet Marketing Services Internet Marketing Services SuratInternet Marketing Services NavsariInternet Marketing Services BharuchInternet Marketing Services VadodaraInternet Marketing Services Ankleshwar