CHAPTER 24

image

An Advanced Syntax Summary

When you learn a new programming language, it is very useful to have a cheat sheet to check quickly the main instructions and the syntax. Here’s the summary of syntax we have learned until now.

Exceptions and Errors

Table 24-1 lists the exception management cheat sheet and some examples of use. In Tables 24-2 and 24-3 you can see the Exception and Error types supported in Dart.

Table 24-1. Exception Management Cheat Sheet

EXCEPTION MANAGEMENT

throw

To throw exceptions

try {}, on {}, catch {}

To catch exceptions

finally {}

To execute a code snippet always, occurs or not an exception

Table 24-2. Exception Types Cheat ...

Get Web Programming with Dart now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.