Hi David,

On your original message (sorry for the late response, been very busy this 
week).

First about, component are not russian dolls.

Then about error handling, you need to set up a simple test environment to 
understand how they work.
An error in the component, if not "trapped" will be propagated to the host if 
my memory serves me right.

This is why I tend to things like this in components :

C_TEXT($vt_errHdlr)
$vt_errHdlr:=Method called on error

ON ERR CALL("HTTP__errorHandler") // a private method of the component 

// I know this can generate an error for instance if not connected to internet
$vl_httpStatus:=HTTP Request(...)

// check stuff, log errors, status, timers, request size, response size, 
throughput

ON ERR CALL($vt_errHdlr)


This may look OTT but there are very few method where this is really necessary 
: not connected to internet, disk full, something you cannot predict basically.

On the other hand programming errors like missing parameters, wrong pointer 
type, nil pointers are coding errors and are ASSERTed (fail fast, fail early, 
fail loud).

If you want to communicate with host and or other components => use callbacks.

HTH
Bruno
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to