Explorar o código

thrown exception when using an unsupported format

Benoît Merlet %!s(int64=12) %!d(string=hai) anos
pai
achega
4a3c419e74
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      src/Composer/Command/LicensesCommand.php

+ 1 - 2
src/Composer/Command/LicensesCommand.php

@@ -92,8 +92,7 @@ EOT
                 break;
 
             default:
-                $output->writeln(sprintf('Unsupported format "%s".  See help for supported formats.', $format));
-                break;
+                throw new \RuntimeException(sprintf('Unsupported format "%s".  See help for supported formats.', $format));
         }
     }
 }