File tree Expand file tree Collapse file tree 5 files changed +9
-5
lines changed Expand file tree Collapse file tree 5 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ linter:
1717 - always_declare_return_types
1818 - annotate_overrides
1919 - avoid_init_to_null
20+ - avoid_types_as_parameter_names
2021 - directives_ordering
2122 - no_adjacent_strings_in_list
2223 - package_api_docs
Original file line number Diff line number Diff line change @@ -388,7 +388,7 @@ class Dartdoc extends PackageBuilder {
388388 Uri uri;
389389 try {
390390 uri = Uri .parse (href);
391- } catch ( FormatError ) {
391+ } on FormatException {
392392 // ignore
393393 }
394394
Original file line number Diff line number Diff line change @@ -458,7 +458,7 @@ class PackageWithoutSdkResolver extends UriResolver {
458458 Uri resolved;
459459 try {
460460 resolved = _sdkResolver.restoreAbsolute (source);
461- } catch ( ArgumentError ) {
461+ } on ArgumentError {
462462 // SDK resolvers really don't like being thrown package paths.
463463 }
464464 if (resolved == null ) {
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ dev_dependencies:
4040 io : ^0.3.0
4141 http : ^0.12.0
4242 meta : ^1.0.0
43- pedantic : ^1.8 .0
43+ pedantic : ^1.9 .0
4444 test : ^1.3.0
4545
4646executables :
Original file line number Diff line number Diff line change @@ -308,8 +308,11 @@ class SubprocessLauncher {
308308 Map result;
309309 try {
310310 result = json.decoder.convert (line);
311- } catch (FormatException ) {
312- // ignore
311+ } on FormatException {
312+ // Assume invalid JSON is actually a line of normal text.
313+ } on TypeError {
314+ // The convert function returns a String if there is no JSON in the
315+ // line. Just ignore it and leave result null.
313316 }
314317 if (result != null ) {
315318 if (jsonObjects == null ) {
You can’t perform that action at this time.
0 commit comments