From 0409bdfea5ea046e3d040ab494b8a0764fd35424 Mon Sep 17 00:00:00 2001 From: TheKoopaKingdom Date: Thu, 13 Apr 2017 01:15:23 -0400 Subject: Optimized messages that were repetitive and added ability for core errors to specify more details optionally. --- src/core/core.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/core.h b/src/core/core.h index a7b4f8d62..bc363ed97 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -6,6 +6,9 @@ #include #include + +#include + #include "common/common_types.h" #include "core/memory.h" #include "core/perf_stats.h" @@ -112,8 +115,16 @@ public: return status; } - void SetStatus(ResultStatus newStatus) { - status = newStatus; + void SetStatus(ResultStatus new_status, std::string details = std::string()) { + status = new_status; + if (details == std::string()) + status_details = boost::none; + else + status_details = details; + } + + boost::optional GetStatusDetails() { + return status_details; } private: @@ -141,7 +152,9 @@ private: std::unique_ptr telemetry_session; static System s_instance; + ResultStatus status; + boost::optional status_details; }; inline ARM_Interface& CPU() { -- cgit v1.2.3