Skip to content

Instantly share code, notes, and snippets.

@tailorvj
Created April 17, 2020 14:26
Show Gist options
  • Save tailorvj/3989551fa8d514a6517725ed056f46d3 to your computer and use it in GitHub Desktop.
Save tailorvj/3989551fa8d514a6517725ed056f46d3 to your computer and use it in GitHub Desktop.
try/catch/finally exception handling in Dart
void main() {
try {
print('going to throw an exception');
int.parse("some string");
}
catch (exception) {
print(exception);
}
finally{
print('this always runs');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment