diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-03-13 17:38:04 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-03-13 17:56:21 -0700 |
| commit | 4114d87a0774fff7d8bc5e041bb56158bfdbcac8 (patch) | |
| tree | 5afcf15a4de03e9294e5fe3b301cdc902b01ddd6 /toolsrc/include/expected.h | |
| parent | 98ea6780e7a4af7d237783a72a2a56a6188ae3da (diff) | |
| download | vcpkg-4114d87a0774fff7d8bc5e041bb56158bfdbcac8.tar.gz vcpkg-4114d87a0774fff7d8bc5e041bb56158bfdbcac8.zip | |
All Checks now take LineInfo as the first argument
Diffstat (limited to 'toolsrc/include/expected.h')
| -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 cbb513b22..377168645 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() && + T&& get_or_throw(const LineInfo& line_info) && { - throw_if_error(); + throw_if_error(line_info); return std::move(this->m_t); } - const T& get_or_throw() const & + const T& get_or_throw(const LineInfo& line_info) const & { - throw_if_error(); + throw_if_error(line_info); return this->m_t; } @@ -71,9 +71,9 @@ namespace vcpkg } private: - void throw_if_error() const + void throw_if_error(const LineInfo& line_info) const { - Checks::check_throw(!this->m_error_code, this->m_error_code.message().c_str()); + Checks::check_throw(line_info, !this->m_error_code, this->m_error_code.message().c_str()); } std::error_code m_error_code; |
