blob: 3f0ac731d955169513f710cb0359c7dc5b077a4c [file] [log] [blame] [view]
# performWithExceptionHandling function
void performWithExceptionHandling
(String name, void work(), void close())
<p>Wraps work with common try/catch behaviour and timeline events.</p>
## Implementation
```dart
void performWithExceptionHandling(
String name, void Function() work, void Function() close) {
try {
Timeline.startSync(name);
work();
} catch (_e) {
handleException(name, _e, close);
rethrow;
} finally {
Timeline.finishSync();
}
}
```