How to handle exception in Angular 17?

Поділитися
Вставка
  • Опубліковано 22 жов 2024

КОМЕНТАРІ • 8

  • @arul12ar9
    @arul12ar9 5 місяців тому

    hey do you have a git or an source ? i cant find the project on your site

  • @sovannborithyun5205
    @sovannborithyun5205 11 місяців тому +1

    Which one is the recommended?

    • @AyyazTech
      @AyyazTech  11 місяців тому

      Hey there! 👋 the recommended error handling strategy in Angular 17 depends on your specific needs. For local issues, a try-catch block is great. For broader, application-wide errors, a Global Error Handler or an HTTP Interceptor would be more effective. Hope that helps, and don't forget to subscribe and hit the bell icon for more tips! 😊🔔

  • @AleksandarT10
    @AleksandarT10 8 місяців тому

    Why do we have the global error handler when we can use the interceptor to log/show toast etc? Am i missing something here?

  • @andriinyvchyk830
    @andriinyvchyk830 9 місяців тому +1

    How use global error handling together with interceptor ?

    • @AyyazTech
      @AyyazTech  9 місяців тому

      Global error handling and interceptors are crucial in managing your application's errors, and it's great you're looking into integrating them! this video walks through setting up a global error handler and an HTTP interceptor in Angular. Essentially, you'll create a custom error handler class to manage exceptions globally, and use an HTTP interceptor to catch and log HTTP errors. This setup ensures your app gracefully manages errors, improving reliability and user experience.
      Don't forget to subscribe to the AyyazTech channel for more in-depth tutorials like this one. Also, hit the like button, share this video, and click the bell icon to stay updated with all our latest content. If you have more questions or suggestions, please leave them in the comments below! Happy coding!

  • @prabhakarant542
    @prabhakarant542 11 місяців тому +1

    How to Global error display in toster

    • @AyyazTech
      @AyyazTech  11 місяців тому

      To display global errors using a toaster in Angular, you'd typically integrate a Global Error Handler with a toaster service. After catching errors globally, you can use the toaster service to display them. The tutorial didn't cover this exact scenario, but if you're interested, I can add a detailed guide on this topic to our upcoming video list! Remember to like, share, and subscribe for more content. 🌟💬🔔