Exception Handling - Javascript In Depth

Sdílet
Vložit
  • čas přidán 27. 07. 2024
  • We look at exception handling in Javascript together. Specifically, we look at the "throw" statement as well as the try/catch control flow construct. These allow us to handle errors in our program in pre-determined ways and let us control whether we want the program to continue or crash.
    This concept will come up everywhere in Javascript and we are only scratching the surface in this video. However, this will give us a good point to jump off from for things like async/await as well as most basic error handling scenarios.
    This is part of a series where we go over Javascript in depth to learn programming concepts as well as web development: • Javascript In Depth
    Chapters:
    00:00 Introduction
    00:49 What is Exception Handling?
    06:19 "Throw" Concept
    08:52 "Catch" Concept
    09:55 Throw Code Example
    11:54 Exception Handling Flow
    12:55 Try Catch Statement
    13:34 Try Catch Code Examples
    20:12 Error Object
    23:46 Practical Example
    29:58 Try Catch Scoping
    31:27 Try Catch Scoping Examples
    40:30 Next Steps
    📦 Github Repository with the notes and exercise code+solutions: github.com/Nooder/javascript-...
    💬 Come join us on Discord to chat with a like-minded community about tech and learning: / discord
    🏅Support the channel and content through Super Thanks, Channel Memberships, or on Patreon: / techwithnader
  • Věda a technologie

Komentáře • 15

  • @devin5550
    @devin5550 Před rokem +6

    you need way more subs, this channel is way better than most of the ones im seeing that have 400k subs

  • @Ale-0303
    @Ale-0303 Před 8 měsíci +7

    You are the greatest teacher.
    I can't even begin to explain how much you helped me with this playlist (and believe me, I've tried many courses before)! Your teaching method works great for me :)

  • @PatricioBottos
    @PatricioBottos Před rokem +7

    Nader, thanks again for another great video on JavaScript in Depth! Your explanation is so calm and clear that even complex issues like the ones you explain seem easy to understand!

    • @TechWithNader
      @TechWithNader  Před rokem

      Thanks Patricio! Glad you're enjoying these 😊

  • @surij8376
    @surij8376 Před 3 měsíci

    Very good tutorial. Thank you!

  • @Ati1254
    @Ati1254 Před rokem +5

    Thanks😍. Explained Nicely.

  • @senniagordinskaya4051
    @senniagordinskaya4051 Před 29 dny

    Thank you!

  • @Politico_Intent
    @Politico_Intent Před 10 měsíci +3

    When attempting to execute our code and dealing with errors, we encounter issues with files like 'throw.js' that cannot be executed without utilizing functions such as 'try-scope.js' and 'try-catch-object.js'. Would it be advisable to delete the 'throw.js' file, considering whether it still serves a significant purpose now that the code can run smoothly?

    • @TechWithNader
      @TechWithNader  Před 10 měsíci +1

      Yup! We would always want to try/catch things and catch any throws that may happen in our code. Usually you would be careful to catch the throw higher up in the call stack so it doesn't stop the program like we saw here 😊

  • @0lynnja
    @0lynnja Před 2 měsíci

    ขอขอบคุณ

    • @TechWithNader
      @TechWithNader  Před 2 měsíci

      Thanks! Hope you’re enjoying the series 😄