Throw std::runtime_error instead of const char *
egorpugin opened this issue · 3 comments
egorpugin commented
https://github.com/ReneNyffenegger/cpp-base64/blob/master/base64.cpp#L63
This line will not be catched by catch (std::exception)
, only catch (...)
.
(Of course it will be catched by catch (const char *)
, but this is not what users write.
Probably it should be replaced with std::runtime_error
.
cyrusbehr commented
Agreed, I have run into this exact error, and would prefer if an std::exception
was thrown.
ReneNyffenegger commented
The function now throws std:runtime_error(...)
.
egorpugin commented
@ReneNyffenegger
Hi,
Could you use https://semver.org/ later for publishing releases?
Like using 3 number tags 2.0.0
or v2.0.0
etc.