Io ho scritto il seguente codice:
genero l'eccezione in questo modo:Codice PHP:class myCustomException extends Exception{
public function __construct($Errori){
parent::__construct($Errori);
}
public function __toString(){
return $this->$Errori;
}
}
$Error è l'array contenente gli erroriCodice PHP:throw new myCustomException($Error); //Ritorno array con errori
Però mi si genera questo errore: Fatal error: Wrong parameters for Exception([string $exception [, long $code ]]) in /home/web/www.schooldesk.it/www/modules/reg/control.php on line 4

Rispondi quotando