diff options
| author | Thomas Fussell <thomas.fussell@gmail.com> | 2017-03-17 00:33:06 -0400 |
|---|---|---|
| committer | Thomas Fussell <thomas.fussell@gmail.com> | 2017-03-17 00:33:06 -0400 |
| commit | d821b0a28a7223d0b49745c53a3ff032fcb001c8 (patch) | |
| tree | 12e13d5ff298a4e4b4f946ceb90b49cbfbe2d2c9 /toolsrc/include/expected.h | |
| parent | 4921636f6bc92e041a410870ce564615c85a6cfb (diff) | |
| parent | 01b1e39c6a006adba7b9cf2af758be679d0b7eb9 (diff) | |
| download | vcpkg-d821b0a28a7223d0b49745c53a3ff032fcb001c8.tar.gz vcpkg-d821b0a28a7223d0b49745c53a3ff032fcb001c8.zip | |
Merge branch 'master' of https://github.com/Microsoft/vcpkg
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; |
