Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Error type and config handling #1416
New error type
As mentioned in issue #1111, users should get useful information when there's a config error. This PR introduces a
It's able to consume bool error flags,
The nano::error type has some documentation here (I'll expand it) https://github.com/cryptocode/notes/wiki/Error-handling
JSON config abstraction
In addition to automated messages, range checks and so on are given a descriptive error, such as "At least one representative account must be set"
EDIT: pr is ready for review
@wezrule seems like some commit comments got removed when I amended by mistake.
What I was saying was that constexpr will (on gcc) produce
@cryptocode No worries. For anyone else reading, I originally commented on 1f82fb9 querying why constexpr was removed instead of inline (as inline is implicit with constexpr) as I thought that's what the warning was about originally, but it was a misguided assumption.
I tried this in compiler explorer (with c++14 compiler option):
It only appears legal with versions gcc 7.2/clang 3.6 and greater. Curious, I did some more research and it looks like it was an oversight in the original spec to not allow constexpr static/non-static member functions of non-literal classes which has since been rectified:
So for greater C++14 compiler support not using them is beneficial (more reason to get #1044 done
@wezrule IIRC static constexpr ran into ODR-used issue in one instance (on some compiler) - something that's apparently fixed in C++17.
Removed the superfluous inline specifier (I have other PRs with it as well; old habit. I'll update them later)
referenced this pull request
Dec 29, 2018
Dec 30, 2018
Jan 3, 2019
Removing didn't compile on clang, but they can probably be defaulted. I'll look into it again.