javascript - What is the Handled filter in Chrome DevTools used for? -


chrome devtools has several useful filters limit logging: errors, warnings, info etc.

the last filter called handled, , have yet find out used for. no console.handle() or similar. googling hasn't provided answer.

for , how use handled filter?

this filter exceptions handled inside of promise. filter added ui this patch. included test , linked ticket reveal feature about.


if create promise , reject so:

var p = new promise((resolve, reject) => reject('ooops')) 

error message printed console:

uncaught error in promise

however, rejection can handled later on:

p.catch(e => {}) 

causing previous error message change state:

handled error

"uncaught (in promise) ooops" becomes "handled promise rejection". since it's not considered error anymore not show when "errors" filter active. show though, when new "handled" filter active.

revoked error not visible when "errors" filter active

revoked error visible when "handled" filter active


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -