diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-01-19 14:58:26 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-01-19 15:00:38 +0100 |
commit | 89a2a11d9f39f60097619212d3fed9ab8c216c8b (patch) | |
tree | f894c74e2806c23c30c4f076ac4875ef0ad0d611 /src | |
parent | 3c4c30eadd879f512ac2075a7ba39c37ff77bf5c (diff) |
Don't use [[noreturn]]
Diffstat (limited to 'src')
-rw-r--r-- | src/libexpr/eval.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index f8685e010..33a9bc614 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -337,10 +337,6 @@ Path EvalState::checkSourcePath(const Path & path_) { if (!allowedPaths) return path_; - auto doThrow = [&]() [[noreturn]] { - throw RestrictedPathError("access to path '%1%' is forbidden in restricted mode", path_); - }; - bool found = false; for (auto & i : *allowedPaths) { @@ -350,7 +346,8 @@ Path EvalState::checkSourcePath(const Path & path_) } } - if (!found) doThrow(); + if (!found) + throw RestrictedPathError("access to path '%1%' is forbidden in restricted mode", path_); /* Resolve symlinks. */ debug(format("checking access to '%s'") % path_); @@ -361,7 +358,7 @@ Path EvalState::checkSourcePath(const Path & path_) return path; } - doThrow(); + throw RestrictedPathError("access to path '%1%' is forbidden in restricted mode", path); } |