public void OnAsyncWifiLog(IAsyncResult result) { try { _fs.EndWriteInJournal(result); } catch (Exception ex) { CatchMe.WriteException(ex).Where("cWifi::OnAsyncWifiLog").WriteOnly <LogFile>(); } }
public void WriteWcfAsync() { try { if (_fs == null) { _fs = new WebCatchException.CatchException(ServeurWcf); } _fs.CatchMeAsync((WebCatchException.MyException) this); } catch (Exception ex) { CatchMe.WriteException(ex).Where("LogWcf::Write").WriteFile(); } }
public void WriteWcfAsync() { try { if (_fs == null) { _fs = new WebCatchException.CatchExceptionClient(new BasicHttpBinding(), new EndpointAddress(ServeurWcf)); } _fs.CatchMe((WebCatchException.MyException) this); _fs.Close(); } catch (Exception ex) { CatchMe.WriteException(ex).Where("LogWcf::Write").WriteFile(); } }
public void WriteWcf() { try { #if !NET35 if (_fs == null) { _fs = new WebCatchException.CatchException(ServeurWcf); } var tt = (WebCatchException.MyException) this; _fs.CatchMe(tt); #else #if !WindowsCE if (_fs == null) { _fs = new WebCatchException.CatchExceptionClient(new BasicHttpBinding(), new EndpointAddress(ServeurWcf)); } _fs.CatchMe((WebCatchException.MyException) this); _fs.Close(); #else if (_fs == null) { _fs = new WcfException.CatchException(); } AsyncCallback cb = new AsyncCallback(OnAsyncWifiLog); _fs.BeginWriteInJournal(Entry.ComputerName, Entry.GetApplicationId(), true, Entry.ToHtml(), cb, null); #endif // } //catch (ProtocolException ex) //{ // CatchMe.WriteException(ex).Where("LogWcf::Write").WriteFile(); #endif } catch (Exception ex) { CatchMe.WriteException(ex).Where("LogWcf::Write").WriteFile(); } }
private static void ProcessException(Exception ex) { CatchMe me = null; try { #if !WindowsCE (me = CatchMe.WriteException(ex).Level(1).Screen().Where()).Write(); #else (me = CatchMe.WriteException(ex).Level(1).Screen().Where("UnhandledExceptionHandler").To <LogFile>()).Write(); #endif if (_CallBack != null) { _CallBack(me); } } catch (Exception ex2) { #if !WindowsCE CatchMe.WriteException(ex2).Level(1).Screen().Where().WriteFile(); #else new LogFile().Write((CatchMe.WriteException(ex2).Level(1).Screen().Where("Double UnhandledExceptionHandler"))); #endif } finally { if (!IsBatch) { ExceptionDialog d = new ExceptionDialog(me); d.ShowDialog(); } System.Diagnostics.Process.GetCurrentProcess().Kill(); } }