Selaa lähdekoodia

thrown exception when using an unsupported format

Benoît Merlet 12 vuotta sitten
vanhempi
commit
4a3c419e74
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  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));
         }
     }
 }