private void HandshakeError(object sender, ServerErrorEventArgs e) { TopMostMessageBox.Show("The server returned an error:\n" + e.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error); e.Handled = true; Back(); }
private void OnError(object sender, ServerErrorEventArgs e) { System.Diagnostics.Debug.WriteLine(e.Exception.Message); if (log.IsErrorEnabled) { log.Error(__Res.GetString(__Res.RtmpEndpoint_Error), e.Exception); } }
private void OnError(object sender, ServerErrorEventArgs e) { Debug.WriteLine(e.Exception.Message); if (log.get_IsErrorEnabled()) { log.Error(__Res.GetString("RtmpEndpoint_Error"), e.Exception); } }
private bool OnServerError(UInt64 serverConnectionHandlerID, string msg, UInt32 error, string extraMsg) { if (ServerError != null) { var args = new ServerErrorEventArgs(new ServerConnectionHandler(serverConnectionHandlerID), (TS3Error)error, msg, extraMsg); ServerError.Invoke(args); return(args.Handled); } return(false); }
public virtual void Error(IServer server, ServerErrorEventArgs e) { if (e.Session == null) { server.Log(LogType.Error, null, "server error {0}@{1}\r\n{2}", e.Message, e.Error.Message, e.Error.StackTrace); } else { server.Log(LogType.Error, null, "session {2}@{3} error {0}@{1}\r\n{4}", e.Message, e.Error.Message, e.Session.RemoteEndPoint, e.Session.ID, e.Error.StackTrace); } }
public override void Error(IServer server, ServerErrorEventArgs e) { if (e.Error != null) { Logger.Exception(e.Error, e.Message); } else { Logger.Error(e.Message); } }
public void Error(IServer server, ServerErrorEventArgs e) { if (e.Session == null) { Loger.Process(LogType.ERROR, "server error {0}@{1}", e.Message, e.Error.Message); } else { Loger.Process(LogType.ERROR, "session {2}@{3} error {0}@{1}", e.Message, e.Error.Message, e.Session.RemoteEndPoint, e.Session.ID); } }
private void server_Error(object sender, ServerErrorEventArgs e) { #if DEBUG App.Current.Dispatcher.BeginInvoke(new Action <ServerErrorEventArgs>((args) => { MessageBox.Show(mainView, args.Exception.ToString(), Resource.ErrorTitle, MessageBoxButton.OK, MessageBoxImage.Error); }), e); #else App.Current.Dispatcher.BeginInvoke(new Action <ServerErrorEventArgs>((args) => { MessageBox.Show(mainView, args.Exception.Message, Resource.ErrorTitle, MessageBoxButton.OK, MessageBoxImage.Error); }), e); #endif }
internal static void OnServerError(string serverMessage) { var args = new ServerErrorEventArgs() { Message = serverMessage }; if (ServerError != null) ServerError(null, args); if (args.Handled) return; MessageBox.Show(Application.Current.MainWindow, "The server has returned an error:\n" + serverMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error); }
private void Server_OnServerError(object sender, ServerErrorEventArgs <TCPServer <StreamPacket>, TCPClient <StreamPacket>, StreamPacket> e) { logger.LogError("Error occurred on method {0} at {1}", e.Method, e.Time); }
private void HandshakeError(object sender, ServerErrorEventArgs e) { MessageBox.Show("The server returned an error:\n" + e.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error); e.Handled = true; Back(); }
public void Error(IServer server, ServerErrorEventArgs e) { Loger.Process(LogType.ERROR, "server {0} error {1}", server.Name, e.Error.Message); }
private void server_Error(object sender, ServerErrorEventArgs e) { #if DEBUG App.Current.Dispatcher.BeginInvoke(new Action<ServerErrorEventArgs>((args) => { MessageBox.Show(mainView, args.Exception.ToString(), Resource.ErrorTitle, MessageBoxButton.OK, MessageBoxImage.Error); }), e); #else App.Current.Dispatcher.BeginInvoke(new Action<ServerErrorEventArgs>((args) => { MessageBox.Show(mainView, args.Exception.Message, Resource.ErrorTitle, MessageBoxButton.OK, MessageBoxImage.Error); }), e); #endif }
/// <summary> /// Raises an event that passes the error message to the viewmodel /// </summary> /// <param name="e"></param> protected virtual void OnServerErrorEvent(ServerErrorEventArgs e) { ServerErrorEvent?.Invoke(this, e); }
public override void Error(IServer server, ServerErrorEventArgs e) { base.Error(server, e); }
public override void Error(IServer server, ServerErrorEventArgs e) { Console.WriteLine("Error"); }
private void Socket_OnServerError(object sender, ServerErrorEventArgs <TServer, TClient, TPacket> e) { OnServerError(e.Method, e.Exception); }
private void RefreshControls(object sender, ServerErrorEventArgs e) { RefreshControls(); }
/// <summary> /// Add <see cref="HttpServer"/> error message to <seealso cref="MainWindowViewModel.ErrorMessage"/> /// </summary> /// <param name="sender"><see cref="HttpServer"/></param> /// <param name="e"><see cref="ServerErrorEventArgs"/></param> private void ServerErrorEvent(object sender, ServerErrorEventArgs e) { ErrorMessage = e.ErrorMessage; }
/// <summary> /// TCP hatalarını yakalar /// </summary> /// <param name="server"></param> /// <param name="e"></param> public override void Error(IServer server, ServerErrorEventArgs e) { Console.WriteLine("Tcp Device Error : " + e.Error.Message); }
//private void SendToListener(string text) //{ // if (listenerClients == null) // return; // var keys = listenerGateway.ClientList.ToArray(); // foreach (var key in keys) // { // if (listenerClients.ContainsKey(key)) // { // try // { // var status = listenerClients[key]; // if (status != null) // { // if (status.IsValid) // { // listenerGateway.Send(key, text); // } // } // } // catch (Exception ex) // { // LoggingManager.Log(ex); // } // } // } //} //void ListenerClientConnected(object Sender, ClientConnectedEventArgs e) //{ // try // { // ClientStatus listenerStatus = new ClientStatus() // { // ConnectedOn = e.ClientConnectedOn // }; // gatewayStatus.ListenerConnected = true; // listenerGateway.Send(e.ClientSocket, ListenerRegisterRequest); // listenerClients.Add(e.ClientSocket, listenerStatus); // } // catch (Exception ex) // { // LoggingManager.Log(ex); // } //} //void ListenerClientDisconnected(object Sender, ClientDisconnectedEventArgs e) //{ // try // { // if(listenerClients.ContainsKey(e.ClientSocket)) // listenerClients.Remove(e.ClientSocket); // } // catch (Exception ex) // { // LoggingManager.Log(ex); // } //} //void ListenerDataReceived(object Sender, DataReceivedEventArgs e) //{ // try // { // if (e.ReceivedText.Equals(ListenerRegisterResponse)) // { // if(listenerClients.ContainsKey(e.ClientSocket)) // { // ClientStatus listenerStatus = listenerClients[e.ClientSocket]; // listenerStatus.IsValid = true; // } // } // else // { // string[] temp = e.ReceivedText.Split('<'); // if (temp == null) // return; // if (temp.Length > 0) // { // string terminalId = temp[0].Trim(); // if (terminalId.Length == 8) // { // SendText(terminalId, e.ReceivedText); // } // } // } // } // catch (Exception ex) // { // LoggingManager.Log(ex); // } //} //void ListenerServerError(object sender, ServerErrorEventArgs e) //{ //} void TerminalServerError(object sender, ServerErrorEventArgs e) { }
private void MiniServer_ServerError(object sender, ServerErrorEventArgs e) { ServerHelper.OutputErrorLog(e.Exception, e.ErrorMessage); }