2 namespace Consolidation\OutputFormatters\Exception;
5 * Represents an incompatibility between the output data and selected formatter.
7 class InvalidFormatException extends AbstractDataFormatException
9 public function __construct($format, $data, $validFormats)
11 $dataDescription = static::describeDataType($data);
12 $message = "The format $format cannot be used with the data produced by this command, which was $dataDescription. Valid formats are: " . implode(',', $validFormats);
13 parent::__construct($message, 1);