Io ho scritto il seguente codice:
Codice PHP:
class myCustomException extends Exception
        public function 
__construct($Errori){
            
parent::__construct($Errori);
        }
        public function 
__toString(){
            return 
$this->$Errori;
        }

genero l'eccezione in questo modo:
Codice PHP:
 throw new myCustomException($Error);        //Ritorno array con errori 
$Error è l'array contenente gli 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