Ejemplo n.º 1
0
        public void Compilar(string comando)
        {
            string rutaCompleta;
            string cmd    = string.Empty;
            int    salida = 0;

            try
            {
                rutaCompleta = Path.Combine(directorio, nombre);
                // cmd = "\"" + rutaCompleta + "\" " + comando;
                cmd = rutaCompleta + " " + comando;
                BorrarArchivosSalidaYError();
                salida = Executor.ExecWaitWithCapture(cmd, archivosTemporales, ref archivoSalida, ref archivoError);
            }
            catch (Exception e)
            {
                throw new Exception(Mensajes.ErrorAlCompilar(this, cmd, e));
            }
            if (salida != 0)
            {
                throw new Exception(Mensajes.ErrorAlCompilar(this, cmd, Error));
            }
        }