mirror of
https://github.com/davidallendj/gdpm.git
synced 2025-12-20 03:27:02 -07:00
Change command-line parsing (again...)
- Added formatted table with `--style` option - Added `warning` log level - Fixed bugs and cleaned up API - Removed some extra debugging output
This commit is contained in:
parent
0238dfd510
commit
b36d55ceee
15 changed files with 685 additions and 255 deletions
|
|
@ -13,6 +13,8 @@ namespace gdpm::constants::error{
|
|||
NONE = 0,
|
||||
UNKNOWN,
|
||||
UNKNOWN_COMMAND,
|
||||
UNKNOWN_ARGUMENT,
|
||||
ARGPARSE_ERROR,
|
||||
NOT_FOUND,
|
||||
NOT_DEFINED,
|
||||
NOT_IMPLEMENTED,
|
||||
|
|
@ -102,6 +104,11 @@ namespace gdpm{
|
|||
#endif
|
||||
}
|
||||
|
||||
static constexpr gdpm::error error_rc(const gdpm::error& e){
|
||||
error(e);
|
||||
return e;
|
||||
}
|
||||
|
||||
static void error(const char *p, const gdpm::error& e){
|
||||
println("{}{}{}", p, prefix.contents, e.get_message());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue