diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-03-28 12:57:00 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-03-28 18:48:03 -0700 |
| commit | 67ce764c2ea7483860a3ad61441608d8978605ae (patch) | |
| tree | 74f64562082ea1df5c2e19e81b5106cd1b4f9741 /toolsrc/include | |
| parent | db4d1df5f0ecd476aae2869828b6060484133438 (diff) | |
| download | vcpkg-67ce764c2ea7483860a3ad61441608d8978605ae.tar.gz vcpkg-67ce764c2ea7483860a3ad61441608d8978605ae.zip | |
[expected] Now uses exit variants instead of throw variants
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/expected.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/toolsrc/include/expected.h b/toolsrc/include/expected.h index 377168645..7cb021c62 100644 --- a/toolsrc/include/expected.h +++ b/toolsrc/include/expected.h @@ -40,15 +40,15 @@ namespace vcpkg return this->m_error_code; } - T&& get_or_throw(const LineInfo& line_info) && + T&& get_or_exit(const LineInfo& line_info) && { - throw_if_error(line_info); + exit_if_error(line_info); return std::move(this->m_t); } - const T& get_or_throw(const LineInfo& line_info) const & + const T& get_or_exit(const LineInfo& line_info) const & { - throw_if_error(line_info); + exit_if_error(line_info); return this->m_t; } @@ -71,9 +71,9 @@ namespace vcpkg } private: - void throw_if_error(const LineInfo& line_info) const + void exit_if_error(const LineInfo& line_info) const { - Checks::check_throw(line_info, !this->m_error_code, this->m_error_code.message().c_str()); + Checks::check_exit(line_info, !this->m_error_code, this->m_error_code.message()); } std::error_code m_error_code; |
