3 namespace Drupal\Core\Form\Exception;
5 use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
8 * Defines an exception used, when the POST HTTP body is broken.
10 class BrokenPostRequestException extends BadRequestHttpException {
13 * The maximum upload size.
20 * Constructs a new BrokenPostRequestException.
22 * @param string $max_upload_size
23 * The size of the maximum upload size.
24 * @param string $message
25 * The internal exception message.
26 * @param \Exception $previous
27 * The previous exception.
29 * The internal exception code.
31 public function __construct($max_upload_size, $message = NULL, \Exception $previous = NULL, $code = 0) {
32 parent::__construct($message, $previous, $code);
34 $this->size = $max_upload_size;
38 * Returns the maximum upload size.
41 * A translated string representation of the size of the file size limit
42 * based on the PHP upload_max_filesize and post_max_size.
44 public function getSize() {