private Error(String Lexema, Categoria Categoria, int NumeroLinea, int PosicionInicial, int PosicionFinal, String Falla, String Causa, String Solucion, TipoError Tipo) : base(Lexema, Categoria, NumeroLinea, PosicionInicial, PosicionFinal) { this.Falla = Falla; this.Causa = Causa; this.Tipo = Tipo; }
public Token(TipoError error, String descripcion, int fila, int columna) { this.Error = error; this.Lexema = descripcion; this.Fila = fila; this.Columna = columna; }
private List <Error> obtenerErrores(TipoError tipo) { if (!errores.ContainsKey(tipo)) { errores.Add(tipo, new List <Error>()); } return(errores[tipo]); }
public static List <Error> ObtenerErrores(TipoError tipoError) { if (!errores.ContainsKey(tipoError)) { errores.Add(tipoError, new List <Error>()); } return(errores[tipoError]); }
public CenturyError(TipoError codigo, string mensaje, string destino, IEnumerable <CenturyError> detalles = null, CenturyError innerError = null) { Codigo = codigo; Mensaje = mensaje; Destino = destino; Detalles = detalles; InnerError = innerError; }
public List <Error> obtenerListaErrores(TipoError Tipo) { if (!mapaErrores.ContainsKey(Tipo)) { mapaErrores.Add(Tipo, new List <Error>()); } return(mapaErrores[Tipo]); }
public static ResultadoOperacion crearResultadoOperacionMySqlException(MySqlException e) { TipoError tipoError = MySqlExceptionHandler.obtenerTipoError(e); switch (tipoError) { case TipoError.ErrorConexionServidor: return (new ResultadoOperacion( EstadoOperacion.ErrorConexionServidor, "MySqlException", e.Number.ToString(), e.InnerException != null ? crearResultadoOperacionException(e.InnerException) : null)); case TipoError.ErrorDesconocido: return (new ResultadoOperacion( EstadoOperacion.ErrorDesconocido, "MySqlException", e.Number.ToString(), e.InnerException != null ? crearResultadoOperacionException(e.InnerException) : null)); case TipoError.ErrorEnServidor: return (new ResultadoOperacion( EstadoOperacion.ErrorEnServidor, "MySqlException", e.Number.ToString(), e.InnerException != null ? crearResultadoOperacionException(e.InnerException) : null)); case TipoError.ErrorAcceso_SintaxisSQL: return (new ResultadoOperacion( EstadoOperacion.ErrorAcceso_SintaxisSQL, "MySqlException", e.Number.ToString(), e.InnerException != null ? crearResultadoOperacionException(e.InnerException) : null)); case TipoError.ErrorAjenoMySql: return (new ResultadoOperacion( EstadoOperacion.ErrorAplicacion, "MySqlException/Aplicación - " + e.Message, e.Number.ToString(), e.InnerException != null ? crearResultadoOperacionException(e.InnerException) : null)); default: return (new ResultadoOperacion( EstadoOperacion.ErrorEnServidor, "MySqlException", e.Number.ToString(), e.InnerException != null ? crearResultadoOperacionException(e.InnerException) : null)); } }
public Error(String Lexema, TipoError tipoError, int NumeroLinea, int PosicionInicial, int PosicionFinal, String causa, String falla, String solucion) { this.NumeroLinea = NumeroLinea; this.PosicionInicial = PosicionInicial; this.PosicionFinal = PosicionFinal; this.Lexema = Lexema; this.Tipo = tipoError; this.Causa = causa; this.Falla = falla; this.Solucion = solucion; }
private Error(TipoError tipo, string lexema, string causa, string falla, string solucion, int numeroLinea, int posicionInicial, int posicionFinal) { Tipo = tipo; Lexema = lexema; Causa = causa; Falla = falla; Solucion = solucion; NumeroLinea = numeroLinea; PosicionInicial = posicionInicial; PosicionFinal = posicionFinal; }
private Error(string lexema, Categoria categoria, int numeroLinea, int posicionInicial, int posicionFinal, string falla, string causa, string solucion, TipoError tipoError) { Categoria = categoria; Lexema = lexema; PosicionFinal = posicionFinal; PosicionInicial = posicionFinal; NumeroLinea = numeroLinea; Falla = falla; Causa = causa; Solucion = solucion; Tipo = tipoError; }
private Error(String Lexedema, Categoria categoria, int numeroLinea, int posicionInicial, int posicionFinal, String Falla, String Causa, String Solucion , TipoError Tipo) { this.Falla = Falla; this.Causa = Causa; this.Solucion = Solucion; this.Tipo = Tipo; this.Lexema = Lexedema; this.categoria = categoria; this.NumeroLinea = numeroLinea; this.posicionFinal = posicionFinal; this.posicionInicial = posicionInicial; }
public void Getmensaje(TipoError tipoerror) { switch (tipoerror) { case TipoError.EXISTENCIA: this.mensaje = "Este registro ya existe"; MessageBox.Show(this.mensaje, "Alerta", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); break; case TipoError.ELIMINACION_POSITIVA: this.mensaje = "Eliminacion realizada con exito!!!"; MessageBox.Show(this.mensaje, "Informacion", MessageBoxButtons.OK, MessageBoxIcon.Information); break; case TipoError.ELIMINACION_NEGATIVA: this.mensaje = "Error al momento de eliminar los datos"; MessageBox.Show(this.mensaje, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); break; case TipoError.DATOS_INVALIDOS: this.mensaje = "Verifique que los campos no esten en blanco y que tengan el formato correcto"; MessageBox.Show(this.mensaje, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); break; case TipoError.INSERCCION_NEGATIVA: this.mensaje = "Error al momento de insertar los datos"; MessageBox.Show(this.mensaje, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); break; case TipoError.INSERCCION_POSITIVA: this.mensaje = "Datos insertado con exito"; MessageBox.Show(this.mensaje, "Informacion", MessageBoxButtons.OK, MessageBoxIcon.Information); break; case TipoError.ACTUALIZACION_POSITIVA: this.mensaje = "Datos actualizado con exito"; MessageBox.Show(this.mensaje, "Informacion", MessageBoxButtons.OK, MessageBoxIcon.Information); break; case TipoError.ACTUALIZACION_NEGATIVA: this.mensaje = "Error al actualizar los datos"; MessageBox.Show(this.mensaje, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); break; } }
public static List <ExpedienteDTO> TraerExpedientesPorOrganismoYCuilYTiposDeTramites(CuilDTO cuilDto, string tiposTram, out string mensaje) { ILog log = LogManager.GetLogger(typeof(InvocaWSExternos).Name); ExpedienteWS.ExpedienteWS oServicio = new ExpedienteWS.ExpedienteWS(); oServicio.Url = ConfigurationManager.AppSettings["ExpedienteWS.ExpedienteWS"]; CuilDTO iCuil = new CuilDTO(); oServicio.Credentials = CredentialCache.DefaultCredentials; TipoError oError = new TipoError(); List <ExpedienteDTO> oList = null; mensaje = string.Empty; try { ExpedienteDTO[] lista = oServicio.BuscarExpedientesPorOrganismoYCuilYTiposDeTramites("024", cuilDto, tiposTram, out oError); if (oError.codigo == 0) { oList = (List <ExpedienteDTO>) reSerializer.reSerialize( lista, typeof(ExpedienteWS.ExpedienteDTO[]), typeof(List <ExpedienteWS.ExpedienteDTO>), oServicio.Url); } else { mensaje = oError.descripcion; } } catch (Exception ex) { log.ErrorFormat("{0}-{1}", System.Reflection.MethodBase.GetCurrentMethod(), ex.Message); mensaje = "Ocurrió un error inesperado. Revise el Log para mayor detalle"; throw new Exception(string.Format("{0} - Error:{1}->{2}", System.Reflection.MethodBase.GetCurrentMethod(), ex.Source, ex.Message)); } finally { oServicio.Dispose(); } return(oList); }
/// <summary> /// Error de acceso denegado /// </summary> /// <param name="app"></param> /// <param name="tipo"> ///- 1 sin token ///- 2 token inválido ///- 3 sin SOAPAction ///- 4 Sin AppSetting serviceName ///- 5 Sin AppSetting serviceToken ///</param> private void DenyAccess(HttpApplication app, TipoError tipo) { string tipoError = string.Empty; switch (tipo) { case TipoError.Sin_Token: tipoError = "Sin Token"; break; case TipoError.Token_inválido: tipoError = "Token inválido"; break; case TipoError.Sin_SOAPAction: tipoError = "Sin SOAPAction"; break; case TipoError.Sin_ServiceName: tipoError = "Sin AppSetting serviceName"; break; case TipoError.Sin_ServiceToken: tipoError = "Sin AppSetting serviceToken"; break; } log.Error("Error de Acceso [" + tipoError + "] - " + app.Request.ServerVariables["HTTP_SOAPACTION"] + " - " + app.Request.UserHostAddress); app.Response.StatusCode = 401; app.Response.StatusDescription = "Acceso Denegado"; // Mensaje que se ve en pantalla app.Response.Write("401 Acceso Denegado"); app.CompleteRequest(); }
public void ShowMensaje(string mensaje, TipoError tipoError) { this.liMensaje.Text = mensaje; this.lblMensajeIcon.Attributes.Add("aria-hidden", "true"); switch (tipoError) { case TipoError.Alerta: { this.lblMensajeIcon.CssClass = "glyphicon glyphicon-exclamation-sign"; this.pnlMensaje.CssClass = "alert alert-danger"; break; } case TipoError.Informacion: { this.lblMensajeIcon.CssClass = "glyphicon glyphicon-info-sign"; this.pnlMensaje.CssClass = "alert alert-info"; break; } case TipoError.Satisfactorio: { this.lblMensajeIcon.CssClass = "glyphicon glyphicon-ok-circle"; this.pnlMensaje.CssClass = "alert alert-succes"; break; } case TipoError.Aviso: { this.lblMensajeIcon.CssClass = "glyphicon glyphicon-exclamation-sign"; this.pnlMensaje.CssClass = "alert alert-warning"; break; } } this.pnlMensaje.Visible = true; }
public EntRespuesta() { this.mensajeError = string.Empty; this.eTipoError = TipoError.SinError; }
public bool hayErrores(TipoError Tipo) { return(obtenerListaErrores(Tipo).Count > 0); }
public bool hayErrores(TipoError tipo) { return(obtenerErrores(tipo).Count > 0); }
public static Error Crear(TipoError tipo, string lexema, string causa, string falla, string solucion, int numeroLinea, int posicionInicial, int posicionFinal) { return(new Error(tipo, lexema, causa, falla, solucion, numeroLinea, posicionInicial, posicionFinal)); }
public static Error Crear(String Lexema, String Categoria, int numeroLinea, int posicionInicial, int posicionFinal, String Causa, String Falla, String Solucion, TipoError Tipo) { return(new Error(Lexema, Categoria, numeroLinea, posicionInicial, posicionFinal, Causa, Falla, Solucion, Tipo)); }
public Boolean HayErrores(TipoError tipo) { return(mapaErrores[tipo].Count > 0); }
public List <Error> ObtenerErrores(TipoError error) { return(mapaErrores[error]); }
public static Error CrearErrorSintactico(String lexema, Categoria categoria, int numeroLinea, int posicionInicial, int posicionFinal, string falla, string causa, string solucion, TipoError tipoError) { return(new Error(lexema, categoria, numeroLinea, posicionInicial, posicionFinal, falla, causa, solucion, TipoError.SINTACTICO)); }
public static List <Error> ObtenerErrores(TipoError Tipo) { return(INSTANCIA.ERRORES[Tipo]); }
public Error(TipoError tipo, Posicion posicion, string mensaje) { Tipo = tipo; Posicion = posicion; Mensaje = mensaje; }
public static bool HayErrores(TipoError Tipo) { return(ObtenerErrores(Tipo).Count > 0); }
public void Limpiar(TipoError error) { mapaErrores[error].Clear(); }