Open dkindlund opened 14 years ago
Author: kindlund If local error/fault handling ever gets extremely complex, then we may want to use the Object Orient Exception handling that is described in this report: http://www.perl.com/pub/a/2002/11/14/exception.html
We're not using anything this complex, for now, as SOAP::Fault
provides an acceptable degree of usability for remote fault handling.
Author: kindlund We'll have to work on this in later versions of the code, once we stabilize the core languages used.
With the exception of:
HoneyClient::Manager::VM
HoneyClient::Agent::Driver
HoneyClient::Util::SOAP
HoneyClient::Util::Config
All other modules need additional error handling and reporting.
$LOG->level($msg)
call, wherelevel
isdebug
,info
,warn
,error
, orfatal
for all respective messagesCarp::croak($msg)
Carp::carp($msg)
For remote SOAP calls on SOAP servers, this means:
$LOG->level($msg)
call, wherelevel
isdebug
,info
,warn
,error
, orfatal
for all respective messagesCarp::croak($msg)
die SOAP::Fault()
'''Note''': For multi-threaded SOAP functions, where faults may occur in an asynchronous operation, you need to develop a fault queuing system, such that the next asynchronous fault gets emitted when the next client makes a SOAP request.
This method is not completely ideal; however, it guarantees all faults will be reported back to '''a''' SOAP client, one fault per subsequent SOAP request. This is acceptable, since we only expect a SOAP server to service a single SOAP client. (We'll have to revisit this issue, if we ever have a SOAP server supporting multiple SOAP clients.)
For an example on how to implement this fault queuing system, see the
_emitQueuedFault()
and_queueFault()
functions within theHoneyClient::Manager::VM
package.'''Note''': Additional sub tickets will be opened, as this issue gets resolved on a per-package basis.