CodeIgniter Forums
How can i handle my own try catch? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: How can i handle my own try catch? (/showthread.php?tid=52510)



How can i handle my own try catch? - El Forum - 06-14-2012

[eluser]Sarwar CSE[/eluser]
I want like this

Code:
function Test(){
             try {
   msgon . open ();
  } catch ( Exception $ex ) {
   echo "Here i want to to show msgon is undifine but it goes to CI";
  }
}

if i wrote a try catch block then if error occurs then it will handle my catch block i don't want to handle it by CI handler .

How can i do this?

please advice me?


How can i handle my own try catch? - El Forum - 06-14-2012

[eluser]InsiteFX[/eluser]
Extend the ./system/core/Exceptions.php Class.