Skip to content

(core): replace misleading error logs in SlotBase

Description

When trying to call/run a slot, an error log was displayed if the signatures don't match, but it is allowed to call a slot with less parameters. Now, an improved information message is displayed and the error is only raised if the slot cannot be called without parameter.

Closes #581 (closed)

How to test it?

Call a slot without parameter (like a view show or hide) with a STimestampSlotCaller or a SBooleanSlotCaller (or a signal with paramerters).

For example with OgreViewer, you can click on the top-right to show the parameters view.

You should not see an error message like [error] sight/libs/core/fwCom/include/fwCom/SlotBase.hxx:217: failed to asyncRun : function_type(FvvE) with function_type(FvdE).
But if you build with info log level, you will see a log like:

[info] sight/libs/core/fwCom/include/fwCom/SlotBase.hxx:232: Failed to asyncRun the slot with one parameter : function_type(FvvE) != function_type(FvdE). Trying to asyncRun the slot without parameter.
Edited by Emilie WERNERT

Merge request reports