feat(tvix/eval): context-aware throw
Change-Id: Ie552dabe4cf93cc396c883268a3bee67796dbbd8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10429 Autosubmit: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
7dcb37fc52
commit
c7d6d08799
1 changed files with 2 additions and 1 deletions
|
@ -1122,8 +1122,9 @@ mod pure_builtins {
|
|||
#[builtin("throw")]
|
||||
async fn builtin_throw(co: GenCo, message: Value) -> Result<Value, ErrorKind> {
|
||||
// TODO(sterni): coerces to string
|
||||
// We do not care about the context here explicitly.
|
||||
Ok(Value::Catchable(CatchableErrorKind::Throw(
|
||||
message.to_str()?.to_string(),
|
||||
message.to_contextful_str()?.to_string(),
|
||||
)))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue