diff --git a/modules_dart/transform/lib/src/transform/common/names.dart b/modules_dart/transform/lib/src/transform/common/names.dart index db5e8ffe25..44c87e9ab0 100644 --- a/modules_dart/transform/lib/src/transform/common/names.dart +++ b/modules_dart/transform/lib/src/transform/common/names.dart @@ -84,5 +84,9 @@ String _toExtension( '$toExtension'; } } - return uri; + throw new ArgumentError.value( + uri, + 'uri', + 'Provided value ends with an unexpected extension. ' + 'Expected extension(s): [${fromExtensions.join(', ')}].'); }