diff options
| author | a1xd <[email protected]> | 2020-08-11 23:49:34 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-08-11 23:49:34 -0400 |
| commit | 08759509371ada546c8d9bc4053b9450c4f58e8b (patch) | |
| tree | 7ffc41237725e3ec0e9f53313644365912ded060 /console/parse.hpp | |
| parent | Merge pull request #12 from JacobPalecki/GUI (diff) | |
| parent | define exceptions for invalid arg & io errors (diff) | |
| download | rawaccel-08759509371ada546c8d9bc4053b9450c4f58e8b.tar.xz rawaccel-08759509371ada546c8d9bc4053b9450c4f58e8b.zip | |
Merge pull request #13 from a1xd/write-cd
write cooldown
Diffstat (limited to 'console/parse.hpp')
| -rw-r--r-- | console/parse.hpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/console/parse.hpp b/console/parse.hpp index 1cdb3fb..abdd36c 100644 --- a/console/parse.hpp +++ b/console/parse.hpp @@ -3,16 +3,12 @@ #include <iostream> #include <rawaccel.hpp> -#include <accel-error.hpp> +#include <rawaccel-error.hpp> #include "external/clipp.h" namespace rawaccel { - inline constexpr int SYSTEM_ERROR = -1; - inline constexpr int PARSE_ERROR = 1; - inline constexpr int INVALID_ARGUMENT = 2; - template<typename Accel, typename StrFirst, typename... StrRest> clipp::parameter make_accel_cmd(modifier_args& args, StrFirst&& first_flag, StrRest&&... rest) { return clipp::command(first_flag, rest...) @@ -113,6 +109,8 @@ namespace rawaccel { ); if (!clipp::parse(argc, argv, cli)) { + constexpr int PARSE_ERROR = 1; + std::cout << clipp::usage_lines(cli, "rawaccel", make_doc_fmt()); std::exit(PARSE_ERROR); } |