Learn Vue JS course Learn Javascript and Vue JS Learn VueJS course Learn VueJS Tutorial

Handling Errors in Vue like a Pro

What Can onErrorCaptured Catch?

onErrorCaptured can catch errors thrown at many different times from descendant components. In this lesson, let’s experiment throwing errors at a different times to see if they are indeed captured. The result? onErrorCaptured can catch errors thrown synchronously and asynchronously from script setup, from event handlers, Vue lifecycle hooks like mounted, and more.

Links