You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using useDeprecatedSynchronousErrorHandling, finalize handlers are not called after a synchronous error is thrown
This is nefarious, because it means that maybe we're not calling any teardowns at all.
import{throwError,config}from"rxjs";import{finalize}from"rxjs/operators";console.clear();config.useDeprecatedSynchronousErrorHandling=true;try{throwError(newError("test")).pipe(finalize(()=>{// This is never called.console.log("finalized");})).subscribe(()=>{console.log("nexted");});}catch(err){console.log("here");}
The text was updated successfully, but these errors were encountered:
…#6251)
* fix: finalize behaves well with useDeprecatedSynchronousErrorHandling
Adds tests and ensures a few more scenarios that were hit in Google because they use the deprecated synchronous error handling.
fixes#6250
* refactor: Move deprecated junk to its own method
Just for readability. The deprecated stuff is a hot mess, and this shows what we get to delete in version 8 more cleanly.
* refactor: Add more comments
* test: Add more tests around gross mode and finalize
When using
useDeprecatedSynchronousErrorHandling
,finalize
handlers are not called after a synchronous error is thrownThis is nefarious, because it means that maybe we're not calling any teardowns at all.
The text was updated successfully, but these errors were encountered: