Csaba Kissi Profile picture
Feb 15 8 tweets 4 min read
Javascript Error handling tactics every web developer should know:
1. Try/Catch Statements

This code block tries to execute a section of code, and if an error occurs, it jumps to the catch block to handle the error.

This is very important for handling any runtime faults that may occur.

Here's one instance:
2. Error Objects

JavaScript's Error object allows you to define and throw your unique errors.

Here's one instance:
3. Error Logging

Logging errors to the console or server can be a handy method for swiftly locating and resolving problems.

You can log errors to the console with console.error() or to a file or server using a logging library such as Winston.
4. Using finally block

The finally block always executes, regardless of whether an error was thrown or not.

It can be used to perform cleanup operations, such as closing a file or releasing resources.
5. Using window.onerror

This event handler can be used to catch any unhandled JavaScript problems.

It is handy for recording problems to the server and showing a polite error message.
If you like this post, you can bookmark and tag it by replying with @SaveToBookmarks #javascript #learn

You can view your bookmarks on savetobookmarks.com
That's all, guys.

If you found this list useful, consider:

✅ Follow @csaba_kissi for more content like this
🔔 Enable notifications 👀
🔄 Retweeting the first tweet.

Thanks for your support, guys! 🙏🤝

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Csaba Kissi

Csaba Kissi Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @csaba_kissi

Feb 15
Web developers should code smarter, not harder.

7 Tools every coder should know about:
{1} @appwrite

Supercharge your web, mobile, and flutter projects.

This open-source alternative to Firebase has you covered.

No more headaches for coders from managing a backend server.

✅ Authentication & Users
✅ Database
✅ Storage
✅ Functions

🔗 appwrite.io Image
{2} Algolia

Create AI-powered search & discovery across websites & apps.

🔗 algolia.com Image
Read 9 tweets
Feb 14
9 sites for developers to get a remote job that pays in 💲USD:
{1} Remote .co

The definitive remote work job board for online job seekers and companies hiring.

🔗 remote.co
{2} RemoteOk

Remote Job Board and has 10+ remote jobs as a Developer, Designer, Copywriter, Customer Support Rep, Sales Professional, Project Manager, and more.

🔗 remoteok.io
Read 11 tweets
Feb 13
Web developers need Free resources.

I bet you didn't know about 86% of the sites on the following list:
{1} @ScribeHow

Stop writing docs and tutorials!

This revolutionary solution lets you auto-generate step-by-step directions with a button.

Save 20+ hours monthly.

300,000+ users.

🔗 getscribe.how/chrome
{2} Free templates for freelancers

Browse through the largest collection of free templates for freelancers, carefully curated by the FYI team.

🔗 nira.com/templates/free…
Read 9 tweets
Feb 11
5 ways to center div vertically and horizontally.
{1} Flexbox
{2} Using absolute positioning and transform
Read 7 tweets
Feb 10
Attention all lifelong learners!

Get ready to expand your knowledge and skills with the FREE courses from Harvard University.

Here are 7 must-see courses that you won't want to pass up on.
{1} Computer Science University Course

Topics:
Abstraction, algorithms, data structures, encapsulation, resource management, security, software engineering, and web programming.

Languages include C, Python, and SQL plus HTML, CSS, and JavaScript.

🔗 freecodecamp.org/news/harvard-c… Image
{2} CS50’s Introduction to Artificial Intelligence with Python

Learn to use machine learning in Python in this introductory course on artificial intelligence.

🔗 edx.org/course/cs50s-i… Image
Read 9 tweets
Feb 9
ChatGPT is super powerful.

But here are 6 other AI tools that can do what ChatGPT cannot.
{1} Magic Studio

Magic Studio helps you automatically edit and create images, using AI

🔗 magicstudio.com
{2} iconifyAI

AI-generated app icons.

Unique, beautiful, and professional.

Made by @saviomartin7 and @Prathkum

🔗 iconifyai.com
Read 9 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(