Mercurial > altnet-hispano
diff Agendas/trunk/src/Agendas.Twitter/TwitterPublicador.cs @ 182:beeb48ddb44a
Warning con los errores que se guarden en el log del track de un evento durante una notificación (twitter, calendar, blog)
author | nelopauselli |
---|---|
date | Mon, 08 Aug 2011 21:57:10 -0300 |
parents | 734d3f0853bf |
children | 9f61e8555114 |
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Twitter/TwitterPublicador.cs Mon Aug 08 20:08:31 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Twitter/TwitterPublicador.cs Mon Aug 08 21:57:10 2011 -0300 @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; using AltNetHispano.Agendas.Configurations; using AltNetHispano.Agendas.Domain; @@ -43,9 +44,16 @@ var twitt = BuildTwitt(track); if (!string.IsNullOrWhiteSpace(twitt)) { - string message; - bool success = _twitterAdapter.Update(twitt, out message); - track.LogAdd(new TrackLog(TrackLogPropietario.Twitter, message, track.Usuario, success)); + try + { + string message; + bool success = _twitterAdapter.Update(twitt, out message); + track.LogAdd(new TrackLog(TrackLogPropietario.Twitter, message, track.Usuario, success)); + } + catch(Exception ex) + { + track.LogAdd(new TrackLog(TrackLogPropietario.Twitter, track.Usuario, ex)); + } } } }