Hi
I sometimes get Mobx warnings about an uncaught exception from a finally block at peekUntracked() in computedValue.ts.
catching the original exception is sometimes tricky and time consuming (like when you run cluncky test tools that has a lot of caught exceptions themselves). It would be much easier if the spy / console.warn would be triggered from within a context that has the uncaught exception - the catch clause, as the line calls console.warn is one click away, so it's simple to add a breakpoint there.
another option is adding the offending exception to the spy report, in addition to throwing it.
@amir-arad, totally unrelated, tell me what cool stuff is happening here :) https://github.com/wix/mutable
Mutable is a data class library with type validations, read-only views etc.
I've recently replaced its internal dirty checking mechanism with mobx, now i'm translating it to typescript and generally making it faster and prettier.
I've just noticed, the readme is very outdated 馃槉
Maybe the nice solution to this problem is to not do anything with exceptions in general. I think MobX since the latest versions recovers in all cases nicely from errors. So I think the warning is might be no longer needed at all, and that it should just be documented that errors are not propagated to observers.
Closed in favor of follow up #731
@amir-arad mutable sounds cool!
Most helpful comment
@amir-arad mutable sounds cool!