microsoft / microsoft/vcpkg

[quickfix] exception incorrectly supported

Open
#36,643 4 comments 0 reactions 1 assignee View on GitHub

@Cheney-W is already working on this.

Since Feb 8, 2024.

category:port-bug Stale
Dominant language
CMake
Stars
27.5k
Forks
7.7k
Avg merge
2d 19h
Merged PRs (30d)
321

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.