The EASY Way to Handle Errors in JavaScript (For Beginners)

  Рет қаралды 9,217

Sonny Sangha

Sonny Sangha

Күн бұрын

🚨 Join the world’s BEST developer course & community: Zero to Full Stack Hero 👉 www.papareact.com/course
📩 Want coding problems (with solutions!) delivered to your inbox daily? www.papareact.com/dailycoding...
🔴 LOOKING FOR THE CODE? 🛠️
links.papareact.com/github
Join me as I teach you several topics related to Try, Catch and Finally Blocks such as:
👉 What is a Try Statement
👉 What is a Catch Statement
👉 What is a Finally Statement
👉 Their Syntax and several Use Cases
👉 How to Rethrow Errors
👉 How to throw Custom Errors
👉 What is Destructuring & How do we use it?
👉 Why it's important to know and understand these Statements!
🖥️ Code Editor used in this tutorial: runjs.app/
👇 FOLLOW ME HERE:
Instagram: links.papareact.com/instagram
Facebook: links.papareact.com/facebook
LinkedIn: links.papareact.com/linkedin
Twitter: links.papareact.com/twitter
Discord: links.papareact.com/discord
Newsletter: links.papareact.com/newsletter
💰 WANT TO SUPPORT THE CHANNEL?
Donate here: links.papareact.com/donate
Grab some PAPAFAM Merch: links.papareact.com/merch
🕐 TIMESTAMPS:
00:00 Introduction
00:13 Introduction to Errors
00:53 Try, Catch and Finally Block Syntax
03:04 Example #1 (Throwing a Custom Error)
05:05 Example #2 (Rethrowing a Error)
06:46 Example #3 (Finally Block)
08:26 Example #4 (Not using the Catch Block)
09:16 Example #5 (Exception Handling in a Timed Function)
11:31 Lesson Summary
11:48 Outro
Let’s get it PAPAFAM 🔥.
#javascript #tutorial #beginner #errorhandling

Пікірлер: 25
@akhil5130
@akhil5130 Жыл бұрын
Nice examples and explanations 👌👌
@dev_ression
@dev_ression Жыл бұрын
great video man, very helpful
@tauqeerhusain7521
@tauqeerhusain7521 Жыл бұрын
Thanks papa fam sir ❤ you are great teacher as well as good programer i learned many things from you ❤❤
@ceejGU
@ceejGU Жыл бұрын
im learning backend and this is perfect for writing endpoints
@DeepLook1
@DeepLook1 Жыл бұрын
Thank u sir we are waiting...
@patite3103
@patite3103 Жыл бұрын
I found the video very useful. Would it be possible to do a video with a more complex structure using Next.js 13 and making debugging? This would help a lot since I regularly get stuck with errors and I don't know how to handle those errors or interpret them. Thank you!
@LizyAd
@LizyAd Ай бұрын
Your content is amazing!
@kajetankowalski420
@kajetankowalski420 Жыл бұрын
Exactly what I was looking for, thank you! :D. And as a sidenote, you're editor theme looks neat, what theme is it?
@farabirashid
@farabirashid Жыл бұрын
Really awesome ❤️
@mohitjassal629
@mohitjassal629 Жыл бұрын
love your content with qazi bro ❤
@pradeepadhikari2035
@pradeepadhikari2035 Жыл бұрын
We are waiting sir
@tech_bahak
@tech_bahak Жыл бұрын
Watching from Nepal
@aniketbhalla1521
@aniketbhalla1521 Жыл бұрын
Please make an advance level error handling video in a React app, handling errors according to different http response statuses with some efficient advance way. Curious. Thanks for this video.
@mustaneerhaider515
@mustaneerhaider515 Жыл бұрын
Can you make a video on how to setup env vaariable inside a react native expo app for both development and when the app is pushed for production to the app stores.
@daring7495
@daring7495 Жыл бұрын
i would like to see a full stack video on hasura, graphql, supabase and nextjs pls
@tushardhalwal329
@tushardhalwal329 Жыл бұрын
plz make a video on how to handle api
@jamshediqbal7936
@jamshediqbal7936 Жыл бұрын
I must say try~catch block should be used when you have async await syntax
@DeepLook1
@DeepLook1 Жыл бұрын
❤ u bro sonny sangha
@okosunfamily1081
@okosunfamily1081 Жыл бұрын
We Good
@AbdulWahab-fs2qg
@AbdulWahab-fs2qg Жыл бұрын
Make modern js course
@pradeepadhikari2035
@pradeepadhikari2035 Жыл бұрын
🚀🚀🚀🚀🚀
@usmanmarkaz
@usmanmarkaz Жыл бұрын
​plz make full stack Netflix clone in React native
@coolemur976
@coolemur976 Жыл бұрын
Giving example of try-catch for type errors instead of recommending using typescript seems strange.
@nikhiltiwari7936
@nikhiltiwari7936 Жыл бұрын
Error: Invalid parameter in getDocument, need either Uint8Array, string or a parameter object this error is coming up again while parsing pdf to text // let buffer = req.file.buffer; // console.log(buffer); // await pdfParse(buffer).then((data) => { // console.log(data.text); // res.status(200).send(data.text, 'PDF file uploaded and converted to text'); // }) where have I made the mistake?
@piyushyadav7764
@piyushyadav7764 Жыл бұрын
let buffer = req.file.buffer; let uint8Array = new Uint8Array(buffer); await pdfParse({ data: uint8Array }).then((data) => { console.log(data.text); res.status(200).send(data.text, 'PDF file uploaded and converted to text'); })
Learn JavaScript Destructuring in 20 minutes (For Beginners)
20:29
Sonny Sangha
Рет қаралды 16 М.
Learn the JavaScript Reduce function in 18 minutes (for beginners)
18:23
How To Choose Ramen Date Night 🍜
00:58
Jojo Sim
Рет қаралды 60 МЛН
NO NO NO YES! (50 MLN SUBSCRIBERS CHALLENGE!) #shorts
00:26
PANDA BOI
Рет қаралды 94 МЛН
JavaScript Modules Crash Course
48:38
freeCodeCamp.org
Рет қаралды 44 М.
How to handle Node.js errors like a Pro?
12:44
Software Developer Diaries
Рет қаралды 21 М.
Learn the JavaScript Map function in 18 minutes (for beginners)
18:23
5 Async + Await Error Handling Strategies
18:11
Wes Bos
Рет қаралды 19 М.
¡Maneja los errores de JavaScript como un senior!
23:20
midulive
Рет қаралды 61 М.
I tried 10 code editors
10:28
Fireship
Рет қаралды 2,8 МЛН
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
5 JavaScript Concepts You HAVE TO KNOW
9:38
James Q Quick
Рет қаралды 1,4 МЛН
How To Choose Ramen Date Night 🍜
00:58
Jojo Sim
Рет қаралды 60 МЛН