Skip to content

linkage crush on disabled exceptions due to missing definition for asio::detail::throw_exception (IDFGH-16915) #965

@Mishok7889

Description

@Mishok7889

Answers checklist.

  • I have read the documentation for esp-protocols components and the issue is not addressed there.
  • I have updated my esp-protocols branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

What component are you using? If you choose Other, provide details in More Information.

ASIO port

component version

1.32.0

IDF version.

5.4.2

More Information.

On disabled exceptions, I've got the linkage error that asio::detail::throw_exception definition not found.

Here we can see the author's comment that it is up to developers to define the way of exception handling if they are disabled. However, the esp asio port actually doesn't provide any custom handling thus everything crushes.

// Declare the throw_exception function for all targets.
template <typename Exception>
[[noreturn]] void throw_exception(
    const Exception& e
    ASIO_SOURCE_LOCATION_DEFAULTED_PARAM);

// Only define the throw_exception function when exceptions are enabled.
// Otherwise, it is up to the application to provide a definition of this
// function.

https://github.com/chriskohlhoff/asio/blob/55684d42ac00021b4c31ba8571aca414c863ead5/include/asio/detail/throw_exception.hpp#L42

I would be grateful for an explanation if I missed something, and there is another way to solve the issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions