rock-core / drivers-transformer

Generic computation of geometric transformations
Other
0 stars 8 forks source link

Improve error cases #21

Closed pierrewillenbrockdfki closed 9 months ago

pierrewillenbrockdfki commented 9 months ago

This adds some more error messages and changes one assert to a message+throw because the assertion is not backed by documentation or code structure, so aborting the process seems a bit harsh.

doudou commented 9 months ago

I don't mind per se ... but can you explain the need ? Anything that catches exceptions generically should really output the message already.

pierrewillenbrockdfki commented 9 months ago

I don't mind per se ... but can you explain the need ? Anything that catches exceptions generically should really output the message already.

The messages are more for the benefit of the person that has to deal with tasks that don't catch the exception. Not sure if orogen/rtt does anything about exceptions leaking from the hooks, though. If that were the case, i would wonder why the messages seem to not make it to the log file.

doudou commented 9 months ago

I am wondering exactly that. The message of exceptions that are caught "leaking" off the hooks are displayed

https://github.com//rock-core/rtt/blob/baaea5022bc79f94770a962e2e16cc0cb28cde0b/rtt/ExecutionEngine.cpp#L399

doudou commented 9 months ago

Maybe the transformer/aggregator isn't ... in which case the best would be to fix that.

pierrewillenbrockdfki commented 9 months ago

I see the discussion in https://github.com/rock-core/drivers-transformer/pull/20. I'll try to figure out what path is failing to log, maybe drop the extra logging part.

pierrewillenbrockdfki commented 9 months ago

My current theory is that for all deployments, RTT ends up logging to the same orocos.log file, while base::logging is always logging to stderr, which is redirected at a separate file. This would be entirely our(dfki) own fault for not setting ORO_LOGFILE to a sensible value in all cases.

doudou commented 9 months ago

The what() is output also to stdout/stderr. At least, these error messages do end up in the "normal" log file.

pierrewillenbrockdfki commented 9 months ago

True, but only if ORO_LOGLEVEL >= 3(Error); we run at ORO_LOGLEVEL=2(Critical); the file gets everything up to 5(Info)(Edit, or higher if ORO_LOGLEVEL is higher).

pierrewillenbrockdfki commented 9 months ago

Dropped the changes to the NonAligningTransfomer. Once we have fixed our process startup no extra messages are needed. Kept the one where the assertion was replaced for consistency.