I am starting to implement the error handling in my framework and some advice on how to create it I'm looking for.
First of all tell me how my frame is currently built:
I want to separate the framework startup from application startup, so anyone within the application startup The error should also be specially managed by that class.
I think that there should be a class named Core_Error_exception
, set the error report to E_ALL
because the errors for my structure will remain strict PHP 5.3 , then as my application load, I will run the shutdown function function within that class to restore all the default values.
What to do to capture all the errors e_ * _ notice
and not e_ * _ error
and then before the application starts I say to the class that Application_Error_Exception
w is looking out for errors.
I would need a way to track all errors including exceptions and triggers, and then show Framework debug page before starting the application.
The class I was looking for is like this:
I am using a small html template handler where I set that reference set errors, hence notification errors and a single e_ * _ error
if applicable.
The best way to create this class like in the past is to do error tracking / reporting.
Renamed : With the current class
If errors have been triggered, such as trigger_up ('test', XXX); I want to be able to track all the errors unless the application launches or an E_USER_ERROR is triggered.
Sometimes I struggle to fully understand the error system of PHP, and in the same way, sometimes I get confused about how to put it, so its degradation-proof.
I'm not sure what you are doing, but in class applications
< The easiest way to use nested blocks with lines of pre> will be: Function run () {{--do stuff} catch {AppException $ e} {- Application-level exception handling} - All other exceptions Classes fall into the core: {$ core-> Try init ()); $ Application & gt; Run (); & Lt; - The above mentioned work calls $ core- & gt; Did (); } Hold (Exception $ E) - Never chance exception handler - Project exception was unable to operate on its own application}
php to be able to catch underlying errors or Trigger_error
In this way, you should always install one.
Comments
Post a Comment