My current thoughts are, if a derived observable throws an error, a separate stream should emit a value.
So if you had
class Foo {
@observable
bar() {
// something happens that causes an error
}
}
var myFoo = new Foo();
foo.bar // "baz" -> good value
foo.bar // causes an error for some reason
foo.errors.bar // this would emit the error
foo.bar // this is still "baz"
This could also be configured somehow for the whole class and also for each property
@error("propertyErrors")
class Foo {
@observable
bar() {
// something happens that causes an error
}
@observable({
error: "bazError"
})
baz() {
// something happens that causes an error
}
}
var myFoo = new Foo();
myFoo.propertyErrors.bar // this is the errors for bar
myFoo.bazError // this is the errors for baz
My current thoughts are, if a derived observable throws an error, a separate stream should emit a value.
So if you had
This could also be configured somehow for the whole class and also for each property