refactor(dart/transform): Error in name convert funcs on unexpected input
Issue raised in PR #6745. Previously, the transformer name conversion functions could return the input string on unexpected input, which is almost certainly an error. `throw` in this case instead, so we know early that something has likely gone wrong. Closes #6753
This commit is contained in:
parent
f56df65d48
commit
cfef76f683
|
@ -84,5 +84,9 @@ String _toExtension(
|
||||||
'$toExtension';
|
'$toExtension';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return uri;
|
throw new ArgumentError.value(
|
||||||
|
uri,
|
||||||
|
'uri',
|
||||||
|
'Provided value ends with an unexpected extension. '
|
||||||
|
'Expected extension(s): [${fromExtensions.join(', ')}].');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue