microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.33k stars 6.45k forks source link

[quickfix] exception incorrectly supported #36643

Open TTournesol opened 9 months ago

TTournesol commented 9 months ago

Is your feature request related to a problem? Please describe.

The QuickFix exception are not correctly propagated. One result is that the optional config parameters are now mandatory (for example LogonDay, LogoutDay, ...). More crucially, the end user cannot catch the exceptions , any exception triggers a terminate(). This

Proposed solution

If my analysis is right, the problem is the use of the QUICKFIX_THROW that is expanded to noexcept (this is done in the port file.cmake) foreach loop REPLACE throw...

Hence all the functions declared as throwing something (QUICKFIX_THROW) ends up being declared as noexcept. So that any exception thrown in these functions result in terminate.

A better solution would be to use the latest version of the git quickfix repo rather than pulling the 1.15 version which is from 2018 which replace the throw with a EXCEPT macro that expands to noexcept(false).

Describe alternatives you've considered

No response

Additional context

No response

Cheney-W commented 8 months ago

I could reproduce this issue with the latest vcpkg.

github-actions[bot] commented 2 months ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

Cheney-W commented 2 months ago

Still active.