From: Scott M. <sco...@gm...> - 2011-03-09 15:23:08
|
I say go ahead and check things in. J* classes it is. And I'll start trying to move some things into the site class after you check your stuff in. Error handling is probably my biggest blind spot. I haven't been in the "application development for pay" world since the early 1990's; what I typically write are administration scripts that make my life easier, so I have very little need for advanced error handling. So, I'm asking for the following: - How do I go about using the error handling class(es) correctly? - What's the big picture, or theory about how it is supposed to work? - What does the user see when an arbitrary error occurs? - What functions are called for that output to be produced? So, asking for that doesn't give you a good launching pad to start with, so, I'll help you out here. And I understand it's in flux yet, so just answer as best you can. My understanding about error handling: 1. PHP program loads 2. an error handling function is registered so that when errors occur, this function is called instead of whatever default action would normally be taken 3. the function needs to check what the severity level of the error is and then does something (one launching area, what does ours do?) 1. It could, as I gather what Joomla does, put all the errors on a stack, which it later, presumably, deals with them appropriately 2. it could stuff the error message(s) into a usually ignored log file 3. it could immediately create a pop-up displaying the error to the user 4. it could email the administrator(s) 5. I'm sure there are other possibilities I'm not mentioning 6. It could do multiple combination's of these actions 4. (another launching point) Somehow, for some errors, the user must be notified, how does ours go about that? So, I've avoided looking at the current error handling classes up to now 'cause I assume it will take a lot of effort to be able to wrap my brain around enough of the code to tease out the "theory" of how our error handling class(es) is(are) supposed to work. So, at this point I don't yet know the function or method names of our error handling class(es). -Scott On Tue, Mar 8, 2011 at 11:48 PM, Mark Wrightson <ma...@rw...>wrote: > Hello, > > I have got quite a few updates to make to the site loading aspects of the > site aswell as a neat way to tidy up the root directory, but it will mean > quite a few files will change or even move. Therefore, before I am asking > whether anyone has any outstanding changes before I do anything? > > Main updates include: > > a) Updated the error handler code to give trace stacks, show the actual > line of code at fault and just generally more debug information. > > b)Updated site class, integrated the installation handling stuff into site > class thus removing install.site.class and other install related files that > were effectively nasty duplication hacks. > > c) tidied up the template parser code. > d) implemented template parser tags that allow functions as well as files > to be called. > > e)a method to tidy up the root directory. > > f) implemented a method to log errors to a database (optional) > > Now in reference to Scotts email: > > Certainly for now we may aswell leave the class names as J*. It is only a > find a replace if we want to change them later. > > What do you need to know about the error handler class? - the code is still > not very mature and lots can be done with it to tidy it up and improve its > functionality. > > I agree, most of the code (the initialisation stuff) in test-lang-stuff.php > could go into the site class. > > Thanks > > Mark > > _____________________________________________ > > Mob: 07725 695178 > Email: ma...@rw... > > > > On 08/03/2011 23:16, Scott Miller wrote: > >> Hi all, >> >> I've checked in a few more changes, mainly focused on further trimming >> down of un-needed stuff from the various classes, and the removal of >> un-needed classes. >> >> I'm still waiting for a discussion on whether we want to continue using J* >> class names (JLanguage, JText, JFile, JFolder, etc) or if we want to use >> something different, and if so, what. >> >> Also still waiting to hear about how the error classes work, and how to >> replace the commented out error stuff in the jclasses with error stuff that >> will actually work for us. >> >> I'm beginning to think about how to go about integrating the JLanguage >> stuff into our existing classes. Should the JLanguage stuff be part of the >> master site class? I'm currently thinking it should. >> >> Isabelle, I think it will be useful to have language specific routines >> that deal with how to correctly format times, dates, and numbers in general. >> Can you point us in the right direction as to how to go about doing this? >> >> -Scott >> > |