diff --git a/CMakeLists.txt b/CMakeLists.txt index ac5c9d8..f63074c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -136,7 +136,7 @@ set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}") set(META_APP_DESCRIPTION "Useful C++ classes and routines such as argument parser, IO and conversion utilities") set(META_FEATURES_FOR_COMPILER_DETECTION_HEADER cxx_thread_local) set(META_VERSION_MAJOR 4) -set(META_VERSION_MINOR 16) +set(META_VERSION_MINOR 17) set(META_VERSION_PATCH 0) # find required 3rd party libraries diff --git a/io/ansiescapecodes.cpp b/io/ansiescapecodes.cpp index b2e6e2c..71b148c 100644 --- a/io/ansiescapecodes.cpp +++ b/io/ansiescapecodes.cpp @@ -90,6 +90,18 @@ std::ostream &operator<<(std::ostream &stream, Phrases phrase) eraseLine(stream); stream << '\r'; break; + case Phrases::SubError: + setStyle(stream, Color::Red, ColorContext::Foreground, TextAttribute::Bold); + stream << " -> ERROR: "; + setStyle(stream, TextAttribute::Reset); + setStyle(stream, TextAttribute::Bold); + break; + case Phrases::SubWarning: + setStyle(stream, Color::Yellow, ColorContext::Foreground, TextAttribute::Bold); + stream << " -> WARNING: "; + setStyle(stream, TextAttribute::Reset); + setStyle(stream, TextAttribute::Bold); + break; } return stream; } diff --git a/io/ansiescapecodes.h b/io/ansiescapecodes.h index a6f4d55..59a5295 100644 --- a/io/ansiescapecodes.h +++ b/io/ansiescapecodes.h @@ -138,12 +138,14 @@ enum class Phrases { End, /**< resets the style */ PlainMessage, /**< bold, 4 spaces " " */ SuccessMessage, /**< bold, green "==> " */ - SubMessage, /**< bold, blue " -> " */ + SubMessage, /**< bold, green " -> " */ ErrorMessage, /**< bold, red "==> ERROR: " */ WarningMessage, /**< bold, yellow "==> WARNING: " */ EndFlush, /**< resets the style and flushes the stream */ Info, /**< bold, blue "Info: " */ Override, /**< erases the current line */ + SubError, /**< bold, red " -> ERROR: " */ + SubWarning, /**< bold, yellow " -> WARNING: " */ }; CPP_UTILITIES_EXPORT std::ostream &operator<<(std::ostream &stream, Phrases phrase);