Error Handling Techniques In CodeIgniter In Hindi.

हेलो दोस्तों इस ब्लॉग पोस्ट(Error Handling Techniques In CodeIgniter In Hindi) में मैं आपको CodeIgniter के अंतर्गत error handling की जानकारी देने वाला हूँ |

कई बार ऐसा होता है कि application use के दौरान हमें errors का सामना करना पड़ता है | और जब यही errors real users के सामने आती है तो फिर यूजर बहुत ही परेशान और frustrate हो जाता है|Error Handling Techniques In CodeIgniter In Hindi|

इसके लिए CodeIgniter बहुत ही सिंपल mechanism provide करती है |Error Handling Techniques In CodeIgniter In Hindi|

जब आप application के डेवलपमेंट स्टेट में होते है तब आप मैसेज display करना ज्यादा पसंद करते है|

जबकि ऐसा आप production स्टेट में नहीं कर सकते है क्योकि development स्टेट में error को हैंडल करना ज्यादा easy है |

और आप अपने application का environment कभी भी चेंज कर सकते है |

इसके लिए आपको index.php में कुछ lines को चेंज करना होता है जो कि निचे दी गयी है |

इसे हम किसी भी value में सेट कर सकते है, पर generally इसके लिए हम तीन वैल्यूज ही सेट करते है |

और यह होती है development , test , और production |

define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');

अलग अलग environment को error reporting के अलग अलग level की जरुरत होती है |

जैसे कि development mode में error डिस्प्ले होती है |

पर testing और live मोड में errors को hide कर दिया जाता है |

CodeIgniter error हैंडल करने के लिए तीन functions provide करता है जो कि नीचे दिए गए है |

functions for errror handling
functions for error handling
function for error handling1
function for error handling log-message: Error Handling Techniques In CodeIgniter In Hindi

अगर हमें error logs चाहिए है तो फिर हम इन्हे application /config /config.php फाइल में enable कर सकते है |

नीचे आप config.php फाइल का एक screenshot देख सकते है |

यहाँ पर आप अपनी threshold वैल्यू सेट कर सकते है |

error logging threshold
error logging threshold: Error Handling Techniques In CodeIgniter In Hindi

आप application /log / में error लॉग्स को find कर सकते है |

पर आपको इतना ध्यान रखना है लोग फाइल को enable करने से पहले कि यह डायरेक्टरी जो है वो writable हो |

error मैसेज के लिए आपको बहुत से templates जो है वो application /views /errors /cli अथवा application /views /errors /html में |

you can also go through a few more amazing blog posts by clicking the below blogs links related to Codeigniter:

What is temp data in Codeigniter in Hindi…
FlashData In CodeIgniter In Hindi…
Session Management In CodeIgniter In Hindi…
Form Validation In CodeIgniter In Hindi…
Email Sending In CodeIgniter In Hindi…
CodeIgniter File Upload In Hindi…
Error Handling Techniques In CodeIgniter In Hindi…
What is CodeIgniter Libraries In Hindi…
CodeIgniter Database Connection In Hindi…
CodeIgniter Configuration In Hindi…
CodeIgniter Basic Concepts In Hindi…
CodeIgniter MVC Framework In Hindi…
CodeIgniter Application Architecture In Hindi…
CodeIgniter Installation In Hindi…
CodeIgniter Tutorial for Beginners in Hindi…

इस ब्लॉग(Error Handling Techniques In CodeIgniter In Hindi) को लेकर आपके मन में कोई भी प्रश्न है तो आप हमें इस पते support@a5theory.comपर ईमेल लिख सकते है|

आशा करता हूँ, कि आपने इस पोस्ट(Error Handling Techniques In CodeIgniter In Hindi) को खूब एन्जॉय किया होगा|

आप स्वतंत्रता पूर्वक अपना बहुमूल्य फीडबैक और कमेंट यहाँ पर दे सकते है|

आपका समय शुभ हो|

Anurag

I am a blogger by passion, a software engineer by profession, a singer by consideration and rest of things that I do is for my destination.