I want to create a class in my framework for exception handling.
How can write the class to be able doing exception handling without using try catch in my codes?
Here is a example:
I tried but couldn't write the code here
exception.php
class Soroush_Exception extends
//some code here
}
===============================
file1.php
$a = 2;
if ($a != 3)
{
throw new Soroush_Exception("Error");
}
//and here I want to show it without using catch with a static method
echo Soroush_Exception::show();
sorry for bad english