UploadException::__construct PHP Method

__construct() public method

public __construct ( $code )
    public function __construct($code)
    {
        $message = $this->codeToMessage($code);
        parent::__construct($message, $code);
    }

Usage Example

 public function __construct($htmlName, $code = 0, \Exception $pex = null)
 {
     parent::__construct($htmlName, $code, $pex);
     if (SecurityConcernException::NOT_UPLOADED === $code) {
         $this->message = 'The file was not uploaded through POST';
     } else {
         if (SecurityConcernException::UNKNOWN_CODE <= $code) {
             $code -= SecurityConcernException::UNKNOWN_CODE;
             $this->message = "The file had an unknown PHP upload error code: {$code}";
         }
     }
 }
All Usage Examples Of UploadException::__construct