Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Consider not using Anyhow for errors #14

Closed
sindreij opened this issue Sep 2, 2021 · 3 comments
Closed

Consider not using Anyhow for errors #14

sindreij opened this issue Sep 2, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@sindreij
Copy link

sindreij commented Sep 2, 2021

Hi, first thanks for creating these libraries, having a good story for webrtc in Rust will be awesome.

We are in the process of using this library (rtp) in an application, however since you are using Anyhow where the error-type does not implemnt std::error::Error, it's difficult to use in application which does not itself use Anyhow.

Anyhow is awesome, but as far as I can understand it's first and foremost meant for applications. Libraries, which is meant to be used from other libraries or application should use something like thiserror (https://crates.io/crates/thiserror).

Anyhow mentions this in their README: https://github.com/dtolnay/anyhow#comparison-to-thiserror

@rainliu
Copy link
Member

rainliu commented Oct 2, 2021

@sindreij, thanks for bringing this issue. @algesten expressed the same concern about Anyhow usage across webrtc-rs crates.

@algesten, can I assign this task to you? You can use RTP as a starting point to migrate Anyhow to thiserror or other solution.

@algesten
Copy link
Member

algesten commented Oct 2, 2021

I'm happy to work on this.

I'll get cracking on a PR for this on Monday.

@algesten
Copy link
Member

algesten commented Oct 5, 2021

Let's close this issue in favor of webrtc-rs/webrtc#106 – where I will track the effort across all sub-crates of the project.

@rainliu rainliu closed this as completed Oct 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants