![]() |
Debugging Class in creation of a Framework
Hi, I'm going into the creation / design of a framework and the first thing I'd like to know about is what a debugging class is. :-P
|
A debugging class would be a component of the framework that eases the debugging if something goes wrong while executing. An example of a debugging component could be to generate a backtrace using debug_backtrace() into some easily understandable trace, so errors/warnings/exceptions can be tracked and you can figure out where you went wrong.
|
On this subject - how would you go an create an Error class for a framework, and how would you implement it and use it?
|
Create an Error class for a framework? I'm not entirely sure that you would want to do so.
|
Why wouldn't you want to create an errorclass that handles Exceptions and stuff ?
|
Firstly, error conditions and exceptions are different beasts. Secondly, you probably wouldn't want one class to take care of everything, but rather tie a collection of classes together: these will be different depending on your framework and requirements wanted.
|
Well, isn't Exceptions a form of Error Handling - yes?
I didn't specify Error conditions, I just said Errorclass. But okay, I see.. well, but still does anyone know a tutorial or anything about how to create a "collection of classes" to handle exceptions? Sure - it may be different than the framework I use, but I'm just looking for some guidance to understand the concept. I know how Exceptions work, I just need to understand how an Exception class works ^_^ |
Quote:
|
Quote:
|
Quote:
|
I would rather use a set of procedural functions for debugging than a class, instead of making a class where almost all methods are better served static (from my point of view).
All you need is a set of functions thats usable for debugging, and only included when debug mode is triggered (if your system ofcourse have a debugging mode). Example of functions can be:
|
| All times are GMT. The time now is 01:54 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0