public ActionResult RprintTicket(TrRprintTicketViewModel vmodel) { try { if (ModelState.IsValid) { TrRprintTicketViewModel vm = new TrRprintTicketViewModel { Tickets = TicketBL.FindTicket(vmodel), MethodsP = PaymentBL.FindMethodsList(), Languages = LanguageBL.FindLanguageListWithoutUniversal() }; ViewBag.ticket = true; return(View(vm)); } vmodel.MethodsP = PaymentBL.FindMethodsList(); vmodel.Languages = LanguageBL.FindLanguageListWithoutUniversal(); ViewBag.ticket = false; return(View(vmodel)); } catch (Exception ex) { //to do insert to log file var e1 = ex.GetBaseException(); // --> log var e4 = ex.Message; // --> log var e5 = ex.Source; // --> log var e8 = ex.GetType(); // --> log var e9 = ex.GetType().Name; // --> log return(View("Error")); } }