diff options
author | Vincent Ambo <mail@tazj.in> | 2022-10-04T09·29+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-10-04T13·13+0000 |
commit | ee0657c2929a77d58dc9f37381c3f0c044ff2d64 (patch) | |
tree | 64b624aad001f849f9137eed3a6f98c78ed36156 /tvix/eval/src | |
parent | 89dc26cece0595009c34a41a5574107833750f03 (diff) |
fix(tvix/eval): forward thunk error codes from inner errors r/5028
Until we can display a chained representatino of errors in thunks, it is most useful to forward the error code from the innermost error to the user. Change-Id: I8d67254d52313be40387f080e57966c001e0d51c Reviewed-on: https://cl.tvl.fyi/c/depot/+/6854 Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src')
-rw-r--r-- | tvix/eval/src/errors.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tvix/eval/src/errors.rs b/tvix/eval/src/errors.rs index 1776cef88b00..b3b45c6cee3d 100644 --- a/tvix/eval/src/errors.rs +++ b/tvix/eval/src/errors.rs @@ -291,7 +291,6 @@ to a missing value in the attribute set(s) included via `with`."#, ErrorKind::InfiniteRecursion => "E014", ErrorKind::ParseErrors(_) => "E015", ErrorKind::DuplicateAttrsKey { .. } => "E016", - ErrorKind::ThunkForce(_) => "E017", ErrorKind::NotCoercibleToString { .. } => "E018", ErrorKind::IndexOutOfBounds { .. } => "E019", ErrorKind::NotAnAbsolutePath(_) => "E020", @@ -301,6 +300,13 @@ to a missing value in the attribute set(s) included via `with`."#, ErrorKind::UnmergeableInherit { .. } => "E024", ErrorKind::UnmergeableValue => "E025", ErrorKind::NotImplemented(_) => "E999", + + // TODO: thunk force errors should yield a chained + // diagnostic, but until then we just forward the error + // code from the inner error. + // + // The error code for thunk forces is E017. + ErrorKind::ThunkForce(ref err) => err.code(), } } |