Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use TypeError instead of NullThrownError #3416

Merged
merged 4 commits into from Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion build_runner/lib/src/build_script_generate/bootstrap.dart
Expand Up @@ -73,7 +73,7 @@ Future<int> generateAndRun(
errorPort = ReceivePort();
messagePort = ReceivePort();
errorListener = errorPort.listen((e) {
final error = e[0] as Object? ?? NullThrownError();
final error = e[0] as Object? ?? TypeError();
final trace = Trace.parse(e[1] as String? ?? '').terse;

handleUncaughtError(error, trace);
Expand Down
Expand Up @@ -39,7 +39,8 @@ builders:
]).create();

var result = await runPub('a', 'run', args: ['build_runner', 'build']);
expect(result.stderr, isEmpty);
expect(result.stderr, isEmpty,
skip: 'https://github.com/dart-lang/sdk/issues/50592');
expect(
result.stdout,
contains(
Expand All @@ -58,7 +59,8 @@ builders:
]).create();

var result = await runPub('a', 'run', args: ['build_runner', 'build']);
expect(result.stderr, isEmpty);
expect(result.stderr, isEmpty,
skip: 'https://github.com/dart-lang/sdk/issues/50592');
expect(
result.stdout,
isNot(contains(
Expand Down Expand Up @@ -87,7 +89,8 @@ builders:
''')
]).create();
var result = await runPub('a', 'run', args: ['build_runner', 'build']);
expect(result.stderr, isEmpty);
expect(result.stderr, isEmpty,
skip: 'https://github.com/dart-lang/sdk/issues/50592');
expect(result.stdout, contains('could not be parsed'));
});
});
Expand All @@ -103,7 +106,8 @@ global_options:
]).create();

var result = await runPub('a', 'run', args: ['build_runner', 'build']);
expect(result.stderr, isEmpty);
expect(result.stderr, isEmpty,
skip: 'https://github.com/dart-lang/sdk/issues/50592');
expect(
result.stdout,
allOf(
Expand Down