Add an optional context string for status line messges

This commit is contained in:
Justin C. Miller
2020-02-24 02:15:45 -08:00
parent 460973954e
commit 36b3ad8154
2 changed files with 10 additions and 4 deletions

View File

@@ -35,14 +35,14 @@ private:
class status_line
{
public:
status_line(const wchar_t *message);
status_line(const wchar_t *message, const wchar_t *context = nullptr);
~status_line();
inline static void warn(const wchar_t *message, const wchar_t *error=nullptr) {
inline static void warn(const wchar_t *message, const wchar_t *error = nullptr) {
if (s_current) s_current->do_warn(message, error);
}
inline static void fail(const wchar_t *message, const wchar_t *error=nullptr) {
inline static void fail(const wchar_t *message, const wchar_t *error = nullptr) {
if (s_current) s_current->do_fail(message, error);
}