Field access should propagate the exception (Err(_)
)
#482
Labels
bug
Something isn't working
E-Easy
Easy
execution
Issues or PRs related to code execution
good first issue
Good for newcomers
Milestone
When
ToObject
(to_object
) throws an error the field accessors don't propagate the error inGetConstField
andGetField
nodesGetConstField: https://github.com/boa-dev/boa/blob/master/boa/src/exec/field/mod.rs#L12-L13
GetField: https://github.com/boa-dev/boa/blob/master/boa/src/exec/field/mod.rs#L25-L26
To fix this we should change from
.expect("failed to convert to object")
to?
try operator.The text was updated successfully, but these errors were encountered: