solved

try { XML.loadString(res/acp("statusTextForParticipants")*) } catch { case 
e:Exception => res/acp("statusTextForParticipants")*;


--getunik ag-------------------------------------------
  oliver straesser              
[email protected]<mailto:[email protected]>
  hardturmstrasse 101    fon: +41 (0)44 388 55 88
  ch-8005 zuerich              fax: +41 (0)44 388 55 89

  --aktuelles getunik projekt-------------------------
  Engagieren Sie sich für den Klimaschutz! 
http://youturn.greenpeace.ch<http://youturn.greenpeace.ch/>


 --best of swiss web awards 2009------------------
   Gold & Silber für Connect2Earth / Bronze für WWF UK

get into conversation - http://www.getunik.com<http://www.getunik.com/>

*****************************************************************
P Bitte drucken Sie dieses E-Mail nur bei Bedarf aus. Die Umwelt dankt es Ihnen.
*****************************************************************

Von: Oliver Strässer
Gesendet: Dienstag, 15. Dezember 2009 18:47
An: '[email protected]'
Betreff: Scala try & catch
Wichtigkeit: Hoch

I have a very important question, because i have trouble with user generated 
content, xhtml and  microsoft word copy & paste.

How is the correct syntax for an try and catch contrsuct in your scala, i found 
some code in the web, but they don't work correct.


i want to do:

{if((res/acp("eMailMessage")).length > 0){
                try {
                                XML.loadString(res/acp("eMailMessage")*)
                } case e:Exception => "";
}



--getunik ag-------------------------------------------
  oliver straesser              
[email protected]<mailto:[email protected]>
  hardturmstrasse 101    fon: +41 (0)44 388 55 88
  ch-8005 zuerich              fax: +41 (0)44 388 55 89

  --aktuelles getunik projekt-------------------------
  Engagieren Sie sich für den Klimaschutz! 
http://youturn.greenpeace.ch<http://youturn.greenpeace.ch/>


 --best of swiss web awards 2009------------------
   Gold & Silber für Connect2Earth / Bronze für WWF UK

get into conversation - http://www.getunik.com<http://www.getunik.com/>

*****************************************************************
P Bitte drucken Sie dieses E-Mail nur bei Bedarf aus. Die Umwelt dankt es Ihnen.
*****************************************************************

Reply via email to