SIL Kit specific exceptions (e.g. SilKit::ConfigurationError) are not transported to the C++ side through the hourglass. There, only the exception Silkit::SilkitError is thrown (ThrowOnError.hpp)
In this PR:
SilKit_ReturnCodeXYZ for all specific exceptions
The CAPI_CATCH_EXCEPTIONS macro catches the specific exception and returns the corresponding SilKit_ReturnCode_XYZ
In ThrowOnError.hpp, the return code leads to the specific exception again
Tests for CAPI_CATCH_EXCEPTIONS and ThrowOnError() in _TestCApiExceptions.cpp
Fix _TestCapiSilKit which was using outdated arguments in CreateParticipant. Also, the silkit_function_mapping test was misleading, as it was actually only testing for bad / invalid parameters with wrong expectations.
SIL Kit specific exceptions (e.g.
SilKit::ConfigurationError
) are not transported to the C++ side through the hourglass. There, only the exceptionSilkit::SilkitError
is thrown (ThrowOnError.hpp)In this PR:
SilKit_ReturnCodeXYZ
for all specific exceptionsCAPI_CATCH_EXCEPTIONS
macro catches the specific exception and returns the correspondingSilKit_ReturnCode_XYZ
CAPI_CATCH_EXCEPTIONS
andThrowOnError()
in _TestCApiExceptions.cppCreateParticipant
. Also, the silkit_function_mapping test was misleading, as it was actually only testing for bad / invalid parameters with wrong expectations.