Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updater Constructor does not actually throw std::invalid_argument #204

Open
Diyou opened this issue Jul 24, 2022 · 0 comments
Open

Updater Constructor does not actually throw std::invalid_argument #204

Diyou opened this issue Jul 24, 2022 · 0 comments

Comments

@Diyou
Copy link
Contributor

Diyou commented Jul 24, 2022

I want to create a wrapper of libappimageupdate for c# (#203).
While working with the code I found that the latter part of the constructor does not actually throw the invalid_argument exception when given an invalid path:
https://github.com/AppImage/AppImageUpdate/blob/2708f91c9ba86eefbc3f13e666cc3356ab9a21a9/src/updater.cpp#L208-L219

AppImageError is thrown in the initializer list of the constructor at:
https://github.com/AppImage/AppImageUpdate/blob/2708f91c9ba86eefbc3f13e666cc3356ab9a21a9/src/updater.cpp#L38

This confused me for a while because I was expecting an ArgumentException in c# and I needed to wrap for std::runtime_error to catch the ApplicationException.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant