Useful Links
Computer Science
Programming
By Language
Dart Programming Language
1. Introduction to Dart
2. Dart Language Fundamentals
3. Functions
4. Object-Oriented Programming (OOP) in Dart
5. Collections
6. Asynchronous Programming
7. Error Handling and Exceptions
8. Dart Tooling and Ecosystem
9. Advanced Topics
Error Handling and Exceptions
Understanding Exceptions
What is an Exception?
Error vs Exception
Exception Hierarchy
Throwing Exceptions
Using the `throw` Keyword
Throwing Objects
Custom Exception Messages
Catching Exceptions
The `try-catch` Block
The `on` Clause for Specific Exceptions
The `catch` Clause to Handle Exception Objects
The `finally` Clause
Multiple Catch Blocks
Rethrowing Exceptions
Common Exception Types
`Exception`
`Error`
Built-in Exception Classes
`ArgumentError`
`RangeError`
`StateError`
`UnsupportedError`
`UnimplementedError`
`FormatException`
Creating Custom Exceptions
Defining Custom Exception Classes
Throwing Custom Exceptions
Exception Best Practices
Stack Traces
Understanding Stack Traces
Accessing Stack Trace Information
Stack Trace in Async Code
Previous
6. Asynchronous Programming
Go to top
Next
8. Dart Tooling and Ecosystem