nextRound
TechnologiesCoding ProblemsBookmarksLearning Paths
nextRound
TechnologiesCoding ProblemsBookmarksLearning Paths
nextRound

AI-powered interview preparation platform. Practice with curated questions, mock interviews, and personalized learning paths to crack your dream tech interview.

Quick Links

  • Technologies
  • Saved Questions
  • Pricing

Company

  • About Us
  • Contact Us

Legal

  • Privacy Policy
  • Terms of Use

© 2026 nextRound. All rights reserved.

TOPIC OVERVIEW

javascript/Error Handling

Catching what goes wrong without hiding why it went wrong.

10 QuestionsIntermediateHigh Priority ~11 min read

try/catch/finally handles synchronous errors, but most real bugs in JavaScript aren't synchronous — they're a rejected promise three layers deep in an async chain, or a callback that throws after the surrounding try block has already finished executing. try/catch only catches errors thrown while it's actively running, which is exactly why wrapping a setTimeout or an unawaited promise in try/catch silently does nothing.

Good error handling also means throwing the right kind of error, not just any error. Extending the built-in Error class to create custom error types (ValidationError, NetworkError) lets calling code branch on error.name or instanceof instead of parsing a message string. And errors that go unhandled don't just disappear — an uncaught synchronous throw crashes the process (in Node) or halts execution, while an unhandled promise rejection fires a separate, easy-to-miss event that many apps never listen for.

What you'll walk away knowing

Why try/catch doesn't catch errors from callbacks or unawaited async code, and what does
How to build custom error classes that extend Error, and why that's better than string-matching messages
The difference between an uncaught synchronous error and an unhandled promise rejection
How error handling changes across async/await, .catch(), and event-based APIs

No questions match "".

All Topics
1
Basics
Data Types
Functions
Objects
2
Engine
JIT
V8
Event Loop and Runtime
Concurrency and Threading
Bytecode and Parsing
Execution Context
Garbage Collector
3
this
Call Apply Bind
Closure
Error Handling
4
String Operations
Array Operations
Iterator and Generator
Modules
5
Events
Promises
Web Workers
Web Sockets
6
Functional Programming
Currying
Higher Order Functions
Memoisation
7
ES6 Classes
ES6
PWA
Web Assembly
Browser APIS
8
Security
Code
Polyfills
Sharethis topic

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.