Skip to content

Commit

Permalink
Remove unused parameter in zone thing (#3581)
Browse files Browse the repository at this point in the history
  • Loading branch information
srawlins committed Nov 15, 2023
1 parent 8f966f6 commit 137b9b7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/src/dartdoc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -260,24 +260,20 @@ class Dartdoc {
///
/// Passing in a [postProcessCallback] to do additional processing after
/// the documentation is generated.
void executeGuarded([
Future<void> Function(DartdocOptionContext)? postProcessCallback,
]) {
void executeGuarded() {
onCheckProgress.listen(logProgress);
// This function should *never* `await runZonedGuarded` because the errors
// thrown in [generateDocs] are uncaught. We want this because uncaught
// errors cause IDE debugger to automatically stop at the exception.
//
// If you await the zone, the code that comes after the await is not
// executed if the zone dies due to an uncaught error. To avoid this,
// confusion, never `await runZonedGuarded` and never change the return
// value of [executeGuarded].
// confusion, never `await runZonedGuarded`.
runZonedGuarded(
() async {
runtimeStats.startPerfTask('generateDocs');
await generateDocs();
runtimeStats.endPerfTask();
await postProcessCallback?.call(config);
},
(e, stackTrace) {
stderr.writeln('\n$_dartdocFailedMessage: $e\n$stackTrace');
Expand Down

0 comments on commit 137b9b7

Please sign in to comment.