Closed dmichiels closed 10 years ago
excellent
Don't think component/failure
was committed to the repo.
%********************** Error: module manager *******************
%**
%** Could not link module
%**
%** Could not load functor at URL: ./components/failure/five.ozf
%**--------------------------------------------------------------
Mainly fix #22
Failure handling
Basic with component
All the errors raised by the port and independent procedures are catch. They are send to the default 'ERROR' simple output port the following record :
port_procedure(name:Name type:Type error:E entryPoint:EntryPoint)
The label changes to independent_procedure if the error is raised inside an independent procedure. The name is the name of the component, the type is the type. error E is the error that crash the execution. entryPoint EntryPoint is the entryPoint of the component. You can do {EntryPoint stop} for example.sub-component
When a sub-component is created, all the 'ERROR' port of the the inside component are automatically binded to the virtual port 'ERROR'. So it's possible to catch all the errors from an sub-component.
Makefile
The make file use now the OZHOME variable
Little change in component.oz
entryPoint
The component record know its own entryPoint.
run
The component had a feature "run". When it's false, the component doesn't execute itself. It put at true when the component receive "start" and at false when the component receive "stop". The start/exec message are merged and simplified.
TestSub
The basic launcher testSub.ozf show all errors in the console. If the same component throw 5 times an error, the component is stopped.
Test
The test has be done with the wrong version of loadBalancer. It seems to work well!