File tree Expand file tree Collapse file tree 3 files changed +5
-13
lines changed Expand file tree Collapse file tree 3 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 1
1
## 2.5.1-wip
2
2
3
- - Don't show stack traces if a generator throws ` InvalidGenerationSourceError `
4
- from ` source_gen ` .
3
+ - Don't log stack traces for subclasses of ` Exception ` .
5
4
6
5
## 2.5.0
7
6
Original file line number Diff line number Diff line change 1
1
## 9.0.1-wip
2
2
3
- - Don't show stack traces if a generator throws ` InvalidGenerationSourceError `
4
- from ` source_gen ` .
3
+ - Don't log stack traces for subclasses of ` Exception ` .
5
4
6
5
## 9.0.0
7
6
Original file line number Diff line number Diff line change 5
5
import 'dart:async' ;
6
6
import 'dart:math' ;
7
7
8
- import 'package:build/build.dart'
9
- show AssetId, SyntaxErrorInAssetException, UnresolvableAssetException;
8
+ import 'package:build/build.dart' show AssetId;
10
9
// ignore: implementation_imports
11
10
import 'package:build_runner/src/internal.dart' ;
12
11
import 'package:logging/logging.dart' ;
@@ -414,8 +413,7 @@ class BuildLog {
414
413
415
414
/// Renders [message] with optional [error] and [stackTrace] .
416
415
///
417
- /// Drops `build_runner` exceptions that can be caused by normal user input:
418
- /// [SyntaxErrorInAssetException] and [UnresolvableAssetException] .
416
+ /// Skips rendering [stackTrace] if [error] is an [Exception] .
419
417
String renderThrowable (
420
418
Object ? message, [
421
419
Object ? error,
@@ -427,11 +425,7 @@ class BuildLog {
427
425
result += '$error ' ;
428
426
}
429
427
430
- if (stackTrace != null &&
431
- error is ! SyntaxErrorInAssetException &&
432
- error is ! UnresolvableAssetException &&
433
- // From `source_gen`, use the name to avoid a build dependency.
434
- error.runtimeType.toString () != 'InvalidGenerationSource' ) {
428
+ if (stackTrace != null && error is ! Exception ) {
435
429
result += '\n $stackTrace ' ;
436
430
}
437
431
return result;
You can’t perform that action at this time.
0 commit comments