Skip to content

Instantly share code, notes, and snippets.

@madmag77
Last active March 6, 2021 08:37
Show Gist options
  • Save madmag77/d6523657d6dd37301cbec64b91dd4a94 to your computer and use it in GitHub Desktop.
Save madmag77/d6523657d6dd37301cbec64b91dd4a94 to your computer and use it in GitHub Desktop.
[Dart article] Exceptions in dart language
try {
final remaingAmount = await getRemainingAmount(account: account);
displayAccountAmount(remaingAmount);
} on SocketException catch (_) {
displayNoConnectionError();
} catch (e, s) {
logException(exception: e, stackTrace: s);
rethrow;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment