UsefulLinks
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
7.
Error Handling and Exceptions
7.1.
Understanding Exceptions
7.1.1.
What is an Exception?
7.1.2.
Error vs Exception
7.1.3.
Exception Hierarchy
7.2.
Throwing Exceptions
7.2.1.
Using the `throw` Keyword
7.2.2.
Throwing Objects
7.2.3.
Custom Exception Messages
7.3.
Catching Exceptions
7.3.1.
The `try-catch` Block
7.3.2.
The `on` Clause for Specific Exceptions
7.3.3.
The `catch` Clause to Handle Exception Objects
7.3.4.
The `finally` Clause
7.3.5.
Multiple Catch Blocks
7.3.6.
Rethrowing Exceptions
7.4.
Common Exception Types
7.4.1.
`Exception`
7.4.2.
`Error`
7.4.3.
Built-in Exception Classes
7.4.3.1.
`ArgumentError`
7.4.3.2.
`RangeError`
7.4.3.3.
`StateError`
7.4.3.4.
`UnsupportedError`
7.4.3.5.
`UnimplementedError`
7.4.3.6.
`FormatException`
7.5.
Creating Custom Exceptions
7.5.1.
Defining Custom Exception Classes
7.5.2.
Throwing Custom Exceptions
7.5.3.
Exception Best Practices
7.6.
Stack Traces
7.6.1.
Understanding Stack Traces
7.6.2.
Accessing Stack Trace Information
7.6.3.
Stack Trace in Async Code
Previous
6. Asynchronous Programming
Go to top
Next
8. Dart Tooling and Ecosystem