Re: exceptions

Thomas De Contes <[email protected]>
Newsgroups gmane.comp.lang.ada.france
Message-ID <[email protected]>
Le 22 mai 10 à 16:03, Ludovic Brenta a écrit :

>
> Thomas De Contes:
>> when others =>
>>    afficherFenetreErreur( others , "imprévue", ,Gtk_Window(w));
>>
>> Mais ça donne :
>> error: reserved word "others" cannot be used as identifier
>
> when E : others =>
>    afficherFenetreErreur(E, "imprévue", ,Gtk_Window(w));



Bon alors, j'ai trouvé une solution pour mon fil "aliased" (dans  
lequel j'ai d'ailleurs peut être pas été très clair) qui me plaît pas  
totalement mais bon je vais faire avec,
sauf qu'il faudrait que je puisse faire

	procedure erreur (erreur : not null access  
Ada.Exceptions.Exception_Occurrence; genre : in String; Parent :  
Gtk.Window.Gtk_Window := null);

		when E : others =>
			erreur( E'Access , "imprévue" ,Gtk_Window(w));

pour pouvoir balader ce pointeur sur mon erreur dans toutes mes  
procédures, pour pouvoir la traiter dans celle que je veux.

Mais apparemment c'est interdit de faire ça ...
("error: prefix of "access" attribute must be aliased")

Y a t il une autre solution ?


-- 
Téléassistance / Télémaintenance
http://www.portparallele.com/ThomasDECONTES/

_______________________________________________
Site WWW de l'association Ada-France: http://www.ada-france.org/
[email protected]
http://www.ada-france.org/mailman/listinfo/ada-france
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.