annotate vendor/consolidation/output-formatters/src/Exception/InvalidFormatException.php @ 9:1fc0ff908d1f

Add another data file
author Chris Cannam
date Mon, 05 Feb 2018 12:34:32 +0000
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 <?php
Chris@0 2 namespace Consolidation\OutputFormatters\Exception;
Chris@0 3
Chris@0 4 /**
Chris@0 5 * Represents an incompatibility between the output data and selected formatter.
Chris@0 6 */
Chris@0 7 class InvalidFormatException extends AbstractDataFormatException
Chris@0 8 {
Chris@0 9 public function __construct($format, $data, $validFormats)
Chris@0 10 {
Chris@0 11 $dataDescription = static::describeDataType($data);
Chris@0 12 $message = "The format $format cannot be used with the data produced by this command, which was $dataDescription. Valid formats are: " . implode(',', $validFormats);
Chris@0 13 parent::__construct($message, 1);
Chris@0 14 }
Chris@0 15 }