public void Map_untyped_ResponderWorker_for_message_with_MessageTypeId_65536() { Func<IMessage, IMessage> echoFunc = m => new TestMessage("response"); var factory = new TypeMappedResponderWorkerFactory(); factory.Map<CustomMessage>(new ResponderWorker(echoFunc)); var requestMessage = new CustomMessage(); var response = factory.GetWorkerFor(requestMessage).GetResponse(requestMessage, null); Assert.IsNotNull(response); }
void Awake() { CustomMessage.registerClientHandler <DisplayInstructionMessage>(instructionHandler); slider.value = 1.0f; enabled = false; }
internal void ShowMessage(CustomMessage message) { uiLog.ShowMessage(message); }
public ActionResult Info(CustomMessage model) { return(View(model)); }
public Result Send(string token, string touser, CustomMessage message) { return(SendAsync(token, touser, message).GetAwaiter().GetResult()); }
private void button1_Click_1(object sender, EventArgs e) { if (radioNormal.Checked == true) { if (txtBayar.Text == "" || int.Parse(txtBayar.Text) <= 0 || int.Parse(txtBayar.Text) < int.Parse(txtTotal.Text)) { DialogResult dr = MessageBox.Show("Silahkan cek kembali besar uang yang diinputkan", "iNBC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } else { if (dataGridView2.RowCount != 0) { updateStockProdukHere(); TSC_C.setPayed(idTransaksi.Text); TSC_C.updateTotalTransaksi(double.Parse(txtTotal.Text), idTransaksi.Text); makeReward(); DialogResult dr = MessageBox.Show("Pembayaran disimpan Normal", "iNBC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); int kembalian = int.Parse(txtBayar.Text) - int.Parse(txtTotal.Text); txtKembalian.Text = kembalian.ToString(); DialogResult dX = CustomMessage.Show("Kembalian anda sebesar: " + kembalian, "Cetak Nota", "Transaksi Baru", "Ok"); if (dX == DialogResult.Yes) { NotaA TransaksiKonsultasiDashBoard = new NotaA(); this.WindowState = FormWindowState.Minimized; TransaksiKonsultasiDashBoard.ShowDialog(); this.WindowState = FormWindowState.Normal; } if (dX == DialogResult.No) { this.Close(); } if (dX == DialogResult.Cancel) { this.Close(); } } else if (dataGridView2.RowCount == 0) { TSC_C.setPayed(idTransaksi.Text); TSC_C.updateTotalTransaksi(double.Parse(txtTotal.Text), idTransaksi.Text); makeReward(); DialogResult dr = MessageBox.Show("Pembayaran disimpan Normal", "iNBC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); int kembalian = int.Parse(txtBayar.Text) - int.Parse(txtTotal.Text); txtKembalian.Text = kembalian.ToString(); DialogResult dX = CustomMessage.Show("Kembalian anda sebesar: " + kembalian, "Cetak Nota", "Transaksi Baru", "Ok"); if (dX == DialogResult.Yes) { NotaA TransaksiKonsultasiDashBoard = new NotaA(); this.WindowState = FormWindowState.Minimized; TransaksiKonsultasiDashBoard.ShowDialog(); this.WindowState = FormWindowState.Normal; } if (dX == DialogResult.No) { this.Close(); } if (dX == DialogResult.Cancel) { this.Close(); } } else { DialogResult drX = MessageBox.Show("HAHAHAHA Error Normal!", "iNBC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } } } else if (radioPoin.Checked == true) { if (txtBayar.Text == "" || int.Parse(txtBayar.Text) <= 0 || int.Parse(txtBayar.Text) < int.Parse(txtTotal.Text)) { DialogResult dr = MessageBox.Show("Silahkan cek kembali besar uang yang diinputkan", "iNBC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } else { if (dataGridView2.RowCount != 0) { updateStockProdukHere(); TSC_C.setPayed(idTransaksi.Text); TSC_C.updateTotalTransaksi(double.Parse(txtTotal.Text), idTransaksi.Text); TSC_C.updateKodePromoInTransaksi("POIN", idTransaksi.Text); makeReward(); DialogResult dr = MessageBox.Show("Pembayaran disimpan POIN", "iNBC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); int kembalian = int.Parse(txtBayar.Text) - int.Parse(txtTotal.Text); txtKembalian.Text = kembalian.ToString(); DialogResult dX = CustomMessage.Show("Kembalian anda sebesar: " + kembalian, "Cetak Nota", "Transaksi Baru", "Ok"); if (dX == DialogResult.Yes) { NotaA TransaksiKonsultasiDashBoard = new NotaA(); this.WindowState = FormWindowState.Minimized; TransaksiKonsultasiDashBoard.ShowDialog(); this.WindowState = FormWindowState.Normal; } if (dX == DialogResult.No) { this.Close(); } if (dX == DialogResult.Cancel) { this.Close(); } } else if (dataGridView2.RowCount == 0) { TSC_C.setPayed(idTransaksi.Text); TSC_C.updateTotalTransaksi(double.Parse(txtTotal.Text), idTransaksi.Text); makeReward(); DialogResult dr = MessageBox.Show("Pembayaran disimpan Normal", "iNBC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); int kembalian = int.Parse(txtBayar.Text) - int.Parse(txtTotal.Text); txtKembalian.Text = kembalian.ToString(); DialogResult dX = CustomMessage.Show("Kembalian anda sebesar: " + kembalian, "Cetak Nota", "Transaksi Baru", "Ok"); if (dX == DialogResult.Yes) { NotaA TransaksiKonsultasiDashBoard = new NotaA(); this.WindowState = FormWindowState.Minimized; TransaksiKonsultasiDashBoard.ShowDialog(); this.WindowState = FormWindowState.Normal; } if (dX == DialogResult.No) { this.Close(); } if (dX == DialogResult.Cancel) { this.Close(); } } else { DialogResult drX = MessageBox.Show("HAHAHAHA Error POIN!", "iNBC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } } } else if (radioPromo.Checked == true) { if (txtBayar.Text == "" || int.Parse(txtBayar.Text) <= 0 || int.Parse(txtBayar.Text) < int.Parse(txtTotal.Text)) { DialogResult dr = MessageBox.Show("Silahkan cek kembali besar uang yang diinputkan", "iNBC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } else { if (dataGridView2.RowCount != 0) { updateStockProdukHere(); TSC_C.setPayed(idTransaksi.Text); TSC_C.updateKodePromoInTransaksi(cmbKodePromo.Text, idTransaksi.Text); TSC_C.updateTotalTransaksi(double.Parse(txtTotal.Text), idTransaksi.Text); makeReward(); DialogResult dr = MessageBox.Show("Pembayaran disimpan Promo", "iNBC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); int kembalian = int.Parse(txtBayar.Text) - int.Parse(txtTotal.Text); txtKembalian.Text = kembalian.ToString(); DialogResult dX = CustomMessage.Show("Kembalian anda sebesar: " + kembalian, "Cetak Nota", "Transaksi Baru", "Ok"); if (dX == DialogResult.Yes) { NotaA TransaksiKonsultasiDashBoard = new NotaA(); this.WindowState = FormWindowState.Minimized; TransaksiKonsultasiDashBoard.ShowDialog(); this.WindowState = FormWindowState.Normal; } if (dX == DialogResult.No) { this.Close(); } if (dX == DialogResult.Cancel) { this.Close(); } } else if (dataGridView2.RowCount == 0) { TSC_C.setPayed(idTransaksi.Text); TSC_C.updateKodePromoInTransaksi(cmbKodePromo.Text, idTransaksi.Text); TSC_C.updateTotalTransaksi(double.Parse(txtTotal.Text), idTransaksi.Text); makeReward(); DialogResult dr = MessageBox.Show("Pembayaran disimpan Normal", "iNBC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); int kembalian = int.Parse(txtBayar.Text) - int.Parse(txtTotal.Text); txtKembalian.Text = kembalian.ToString(); DialogResult dX = CustomMessage.Show("Kembalian anda sebesar: " + kembalian, "Cetak Nota", "Transaksi Baru", "Ok"); if (dX == DialogResult.Yes) { NotaA TransaksiKonsultasiDashBoard = new NotaA(); this.WindowState = FormWindowState.Minimized; TransaksiKonsultasiDashBoard.ShowDialog(); this.WindowState = FormWindowState.Normal; } if (dX == DialogResult.No) { this.Close(); } if (dX == DialogResult.Cancel) { this.Close(); } } else { DialogResult drX = MessageBox.Show("HAHAHAHA Error Promo!", "iNBC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } } } else { DialogResult dr = MessageBox.Show("Silahkan pilih metode pembayaran", "iNBC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } }
void Start() { _instance = this; CustomMessage.registerServerHandler <ClientStartGame>(onClientStartGame); }
void Awake() { _instance = this; CustomMessage.registerClientHandler <CreatePanelMessage>(panelCreator); }
/// <summary> /// 调用模板接口向用户推送消息 /// </summary> /// <param name="message"></param> /// <returns></returns> public static void SendCustomTemplateMessage(CustomMessage message) { string rawUrl = "https://api.weixin.qq.com/cgi-bin/message/template/send?"; WechatApi.PostWechatApiWithToken <WechatApiTemplateResponseMessage>(rawUrl, message); }
public void TearDown() { user = null; customMsg = null; }
public void Setup() { user = new CreateAccount(); customMsg = new CustomMessage(); }
public void Handle(CustomMessage message) { }
public void AppendWithCustomPerMessageProperties() { var testAppender = new TestGelf4NetAppenderWrapper(); testAppender.RemoteAddress = "127.0.0.1"; testAppender.AdditionalFields = "global1:foo,global2:bar"; testAppender.ActivateOptions(); var data = new LoggingEventData { Domain = GetType().Name, Level = Level.Debug, LoggerName = "PerMessageProperties", TimeStamp = DateTime.UtcNow, UserName = "******" }; var messageObject = new CustomMessage { ShortMessage = "This is a custom message to test per-message fields and overrides.", CustomFields = new Dictionary<string, string> { { "message1", "baz" }, { "message2", "baf" }, { "message3", "woohoo" } } }; data.Message = messageObject.ToString(); var logEvent = new LoggingEvent(GetType(), new Hierarchy(), data.LoggerName, data.Level, messageObject, new InvalidOperationException("This is a test exception!")); testAppender.TestAppend(logEvent); JObject gelfMessage = JObject.Parse(testAppender.LastMessage); Assert.AreEqual(gelfMessage["_global1"].ToString(), "foo"); Assert.AreEqual(gelfMessage["_global2"].ToString(), "bar"); Assert.AreEqual(gelfMessage["_message1"].ToString(), "baz"); Assert.AreEqual(gelfMessage["_message2"].ToString(), "baf"); Assert.AreEqual(gelfMessage["_message3"].ToString(), "woohoo"); Assert.AreEqual(messageObject.ShortMessage, gelfMessage["short_message"].ToString()); }
private void OnCustomMessageRecerved(NetworkMessage netMsg) { CustomMessage m = netMsg.ReadMessage <CustomMessage>(); Debug.LogFormat("CustomMessageを受信: {0}, {1}, {2}, {3}", m.intValue, m.floatValue, m.stringValue, m.vector3Value); }
//Using Custom popup message box public void NoInternetPopup() { var popup = new CustomMessage(); App.Current.MainPage.Navigation.PushPopupAsync(popup, true); }
// Update is called once per frame void Update() { //1キーでサーバーの機能が起動し、ネットワーク越しの通信を待ち受けます。 //2キーでHandler(イベント受信時に呼ばれる関数)を登録します。 //3キーでサーバーからクライアントに向けてメッセージHogeを送信します。 //4キーでサーバーからクライアントに向けてメッセージFugaを送信します。 //Qキーでクライアントのインスタンスを生成します。 //Wキーでクライアントの接続状態をログに出します。 //Eキーでサーバーに接続します(今回は自身のIPアドレスを決め打ちしています。ここを変えれば、別のマシンに接続します) //RキーでHandlerを登録します。 //Tキーでクライアントからサーバーに向けてメッセージHogeを送信します。 //Yキーでクライアントからサーバーに向けてメッセージFugaを送信します。 if (Input.GetKeyDown(KeyCode.Alpha1)) { print("サーバー起動"); NetworkServer.Listen(Port); } if (Input.GetKeyDown(KeyCode.Alpha2)) { // MessageIDに紐づいた関数を登録 // Handlerで登録するメソッドは引数にNetworkMessageを取る必要あり print("Handlerを登録"); NetworkServer.RegisterHandler(MyMsg.Hoge, OnHogeReceived); NetworkServer.RegisterHandler(MyMsg.Fuga, OnFugaReceived); NetworkServer.RegisterHandler(MyMsg.Custom, OnCustomMessageRecerved); } if (Input.GetKeyDown(KeyCode.Alpha3)) { print("サーバーから全クライアントへMsgHogeを送信"); NetworkServer.SendToAll(MyMsg.Hoge, new EmptyMessage()); } if (Input.GetKeyDown(KeyCode.Alpha4)) { print("サーバーから全クライアントへMsgFugaを送信"); NetworkServer.SendToAll(MyMsg.Fuga, new EmptyMessage()); } if (Input.GetKeyDown(KeyCode.Alpha5)) { print("サーバーから全クライアントへ123を送信"); NetworkServer.SendToAll(MyMsg.Int, new IntegerMessage(123)); } if (Input.GetKeyDown(KeyCode.Alpha6)) { print("サーバーから全クライアントへ文字列を送信"); NetworkServer.SendToAll(MyMsg.String, new StringMessage("こんにちは")); } if (Input.GetKeyDown(KeyCode.Q)) { print("クライアント生成"); client = new NetworkClient(); } if (Input.GetKeyDown(KeyCode.W)) { print("client.isConnected:" + client.isConnected); } if (Input.GetKeyDown(KeyCode.E)) { print("クライアントをサーバーへ接続"); client.Connect("127.0.0.1", Port); } if (Input.GetKeyDown(KeyCode.R)) { print("Handlerを登録"); client.RegisterHandler(MyMsg.Hoge, OnHogeReceived); client.RegisterHandler(MyMsg.Fuga, OnFugaReceived); client.RegisterHandler(MyMsg.Int, OnIntegerMessageReceived); client.RegisterHandler(MyMsg.String, OnStringMessageReceived); } if (Input.GetKeyDown(KeyCode.T)) { print("クライアントからサーバーへMsgHogeを送信"); client.Send(MyMsg.Hoge, new EmptyMessage()); } if (Input.GetKeyDown(KeyCode.Y)) { print("クライアントからサーバーへMsgFugaを送信"); client.Send(MyMsg.Fuga, new EmptyMessage()); } if (Input.GetKeyDown(KeyCode.U)) { print("クライアントからサーバーへCustomMessageを送信"); CustomMessage m = new CustomMessage(); m.intValue = 1234; m.floatValue = 567.8f; m.stringValue = "あいうえお"; m.vector3Value = new Vector3(1, 2, 3); client.Send(MyMsg.Custom, m); } }
private void _initializeMessenger() { Messenger.Default.Register <CustomMessage>(this, (msg) => { // Works with the Person object. CustomMessage m = (CustomMessage)msg; Debug.WriteLine("MainWindow.CustomMessage: " + m.msgtype); switch (m.msgtype) { case CustomMessage.MessageType.SELECTED: // editText1 goto first line try { EditText1.ScrollToLine(0); } catch (System.ArgumentOutOfRangeException) { } // goto text mode _changeHtmlMode(false); var node = ViewModel.CurrentExplorerNode; if (node != null && node.ExplorerType == ExplorerType.File && node.Name.EndsWith(".html")) { _changeHtmlMode(true); _copyTextToHtml(true, true); } if (EditText1.Text.IndexOf("<!DOCTYPE html") >= 0) { _changeHtmlMode(true); _copyTextToHtml(true, true); } break; case CustomMessage.MessageType.HTML_MODE_CHANGED: bool goto_html_mode = (m.str1 == "html"); _changeHtmlMode(goto_html_mode); _copyTextToHtml(goto_html_mode, true); break; case CustomMessage.MessageType.FOLDER_CHANGED: string path = m.str1; SBText1.Text = path; break; case CustomMessage.MessageType.BEFORE_FILE_SAVE: if (EditHtml1._HtmlEditor != null) { ViewModel.EditHtml = EditHtml1._HtmlEditor.InnerHtml; } ViewModel.EditText = EditText1.Text; break; case CustomMessage.MessageType.AFTER_FILE_CHANGE_EXTENSION: //EditHtmlCommandBtn_Clicked(null, null); break; default: break; } }); }
/// <summary> /// 发送客服消息 /// </summary> /// <param name="account">微信帐号</param> /// <param name="account"></param> /// <returns></returns> public static ResponseState SendMessage(WeiXinAccount account, string openID, CustomMessage message) { return(SendMessage(GetAccessToken(account).Access_Token, openID, message)); }
/// <summary> /// 发送客服信息 /// </summary> /// <param name="accessToken">调用凭据</param> /// <param name="msg">客服消息</param> /// <returns></returns> public static SendCustomMessageResponse SendCustomMessage(string accessToken, CustomMessage msg) { return(SendCustomMessage(accessToken, msg.ToJsonString())); }
public void ShowMessage(string message) { var messsageBox = new CustomMessage(message); messsageBox.Show(); }
public override void OnMessage(Context context, CustomMessage customMessage) { Log.Error(TAG, "[onMessage] " + customMessage); processCustomMessage(context, customMessage); }
/// <summary> /// 发送客服信息 /// </summary> /// <param name="accessToken">调用凭据</param> /// <param name="msg">客服消息</param> /// <returns></returns> public static SendCustomMessageResponse SendCustomMessage(string accessToken, CustomMessage msg) { IMpClient mpClient = new MpClient(); SendCustomMessageRequest request = new SendCustomMessageRequest() { AccessToken = accessToken, SendData = msg.ToJsonString() }; SendCustomMessageResponse response = mpClient.Execute(request); return(response); }
private async Task <Message> ProcessOperation(HttpContext httpContext, IServiceProvider serviceProvider) { Message responseMessage; //Reload the body to ensure we have the full message using (var reader = new StreamReader(httpContext.Request.Body)) { var body = await reader.ReadToEndAsync(); var requestData = Encoding.UTF8.GetBytes(body); httpContext.Request.Body = new MemoryStream(requestData); } //Return metadata if no request if (httpContext.Request.Body.Length == 0) { return(ProcessMeta(httpContext)); } //Get the message var requestMessage = _messageEncoder.ReadMessage(httpContext.Request.Body, 0x10000, httpContext.Request.ContentType); var soapAction = (httpContext.Request.Headers["SOAPAction"].FirstOrDefault() ?? requestMessage.GetReaderAtBodyContents().LocalName).Trim('\"'); if (!string.IsNullOrEmpty(soapAction)) { requestMessage.Headers.Action = soapAction; } var operation = _service.Operations.FirstOrDefault(o => o.SoapAction.Equals(soapAction, StringComparison.Ordinal) || o.Name.Equals(soapAction, StringComparison.Ordinal)); if (operation == null) { throw new InvalidOperationException($"No operation found for specified action: {requestMessage.Headers.Action}"); } _logger.LogInformation($"Request for operation {operation.Contract.Name}.{operation.Name} received"); try { //Create an instance of the service class var serviceInstance = serviceProvider.GetRequiredService(_service.ServiceType); var headerProperty = _service.ServiceType.GetProperty("MessageHeaders"); if (headerProperty != null && headerProperty.PropertyType.IsInstanceOfType(requestMessage.Headers)) { headerProperty.SetValue(serviceInstance, requestMessage.Headers); } // Get operation arguments from message var outArgs = new Dictionary <string, object>(); var arguments = GetRequestArguments(requestMessage, operation, ref outArgs); var allArgs = arguments.Concat(outArgs.Values).ToArray(); // Invoke Operation method var responseObject = operation.DispatchMethod.Invoke(serviceInstance, allArgs); if (operation.DispatchMethod.ReturnType.IsConstructedGenericType && operation.DispatchMethod.ReturnType.GetGenericTypeDefinition() == typeof(Task <>)) { var responseTask = (Task)responseObject; await responseTask; responseObject = responseTask.GetType().GetProperty("Result").GetValue(responseTask); } var i = arguments.Length; var resultOutDictionary = new Dictionary <string, object>(); foreach (var outArg in outArgs) { resultOutDictionary[outArg.Key] = allArgs[i]; i++; } // Create response message var resultName = operation.DispatchMethod.ReturnParameter.GetCustomAttribute <MessageParameterAttribute>()?.Name ?? operation.Name + "Result"; var bodyWriter = new ServiceBodyWriter(_serializer, operation.Contract.Namespace, operation.Name + "Response", resultName, responseObject, resultOutDictionary); responseMessage = Message.CreateMessage(_messageEncoder.MessageVersion, null, bodyWriter); responseMessage = new CustomMessage(responseMessage); httpContext.Response.ContentType = httpContext.Request.ContentType; httpContext.Response.Headers["SOAPAction"] = responseMessage.Headers.Action; _messageEncoder.WriteMessage(responseMessage, httpContext.Response.Body); } catch (Exception exception) { _logger.LogWarning(0, exception, exception.Message); responseMessage = WriteErrorResponseMessage(exception, StatusCodes.Status500InternalServerError, serviceProvider, httpContext); } return(responseMessage); }
public static void Run( [QueueTrigger("sample-queue")] CustomMessage message, ILogger logger) { logger.LogInformation("Received message from sample-queue, content={content}", message.Content); }
public override void OnException(ExceptionContext filterContext) { RouteData currentRouteData = filterContext.RouteData.Route.GetRouteData(filterContext.HttpContext); String currentController = String.Empty, currentAction = String.Empty; if (filterContext.HttpContext.Request.IsAjaxRequest()) { //Because its a exception raised after ajax invocation //Lets return Json filterContext.Result = new JsonResult() { Data = filterContext.Exception.Message, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; filterContext.ExceptionHandled = true; filterContext.HttpContext.Response.Clear(); return; } if (currentRouteData != null) { currentController = currentRouteData.Values["controller"].ToString(); currentAction = currentRouteData.Values["action"].ToString(); } filterContext.ExceptionHandled = true; //filterContext.HttpContext.Response.StatusCode = 200; //filterContext.HttpContext.ClearError(); filterContext.Result = new ViewResult() { ViewName = currentAction, }; return; base.OnException(filterContext); Exception ex = (Exception)filterContext.Exception; HttpContextBase httpContext = filterContext.HttpContext; httpContext.ClearError(); RouteData routeData = new RouteData(); string CustomExceptionType = String.Empty; CustomExceptionType = ex.GetType().Name; if (CustomExceptionType == "CustomMessage") { CustomMessage cm = (CustomMessage)filterContext.Exception; routeData.Values["ExceptionMessage"] = cm.Message; var viewData = new ViewDataDictionary <HandleErrorInfo>(filterContext.Controller.ViewData); viewData.Add("ExceptionMessage", cm.Message); httpContext.Response.StatusCode = 200; filterContext.ExceptionHandled = true; filterContext.HttpContext.Response.TrySkipIisCustomErrors = true; } else { httpContext.Response.Clear(); httpContext.Response.StatusCode = (Exception)ex is HttpException ? ((HttpException)(Exception)ex).GetHttpCode() : 500; httpContext.Response.TrySkipIisCustomErrors = true; Error404Controller controller = new Error404Controller(); routeData.Values["controller"] = CustomMessages.Error404; routeData.Values["action"] = CustomMessages._ErrorView; routeData.Values["ExceptionMessage"] = CustomMessages.ErrorPlzTryAgain; routeData.Values["IsAjaxRequest"] = filterContext.HttpContext.Request.IsAjaxRequest(); if (CustomExceptionType == Convert.ToString(ExpeptionTypes.LoginException)) { routeData.Values["ExceptionType"] = (Int32)ExceptionTypeEnum.LogoutWithAjaxRequest; } else { routeData.Values["ExceptionType"] = (Int32)ExceptionTypeEnum.Exception; if (CustomExceptionType == Convert.ToString(ExpeptionTypes.CustomMessage)) { CustomMessage cm = (CustomMessage)filterContext.Exception; routeData.Values["ExceptionMessage"] = cm.Message; } else { if (CustomExceptionType == Convert.ToString(ExpeptionTypes.CustomException)) { CustomException ce = (CustomException)filterContext.Exception; routeData.Values["ExceptionMessage"] = ce.Message; //ex = ce.Exception; } ErrorSignal.FromCurrentContext().Raise(ex); } } controller.ViewData.Model = new HandleErrorInfo(ex, currentController, currentAction); ((IController)controller).Execute(new RequestContext(filterContext.HttpContext, routeData)); } }