Information générale
Catégorie:
Codage, syntaxe et commandes
David,
Sorry for 50 questions today...
Do you do a SET PROC TO DevProc or something like that when you open VFP? and keep ObjError() in a procedure file... or is ObjError.prg on your path???
Thanks
John
>All of my lowest level classes cTextbox, cForm, cGrid, etc. have the one line of code to call ObjError() I set it up as a UDF so I don't have to test for the existence of a service provider like oApp or oErrorHandler. This minimizes duplicated code in each of the baseclasses. In ObjError() you could encapsulate the functionality of looking for oErrorHandler, instantiating it if it doesn't exist and handing the error off to it. For the kind of development I do logging the error and shutting down a runtime app or going into the debugger at devtime is all I've ever needed.
>
>>How does ObjError call debug? Do you suspend in your error method if you are in the dev environment if you call debug?
>
>I use glRuntime = ( version(2) = 0 )
to determine if it's runtime or devtime. If it's devtime I pop up lnResult = MessageBox( m.lcMessage1 + m.lcObject + "Suspend?", MB_YESNOCANCEL + MB_ICONSTOP, _screen.Caption )
if lnResult = IDYES the code just does an activate window trace
and suspend
from there it's just a couple of single steps to get back to the code that caused the error.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement