7
I did that method:
public int VerificaUltimaAnalise()
        {
            //Desenvolvimento
            WFExecutor vcmpExecutor = null;
            WFAnalise vcmpAnalise = null;
            Core vmpaCore = null;
            int vintCdTransacao = 0;
            int vintCdProxProcesso = 0;
            int vintCdAnalise = 0;
            try
            {
                //Instâncias e Inicializalções
                vcmpExecutor = new WFExecutor();
                vcmpAnalise = new WFAnalise();
                vmpaCore = (Core)Page.Master;
                //Desenvolvimento
                //vintCdTransacao = vcmpExecutor.ConsultarTransacao(Request.Path.Substring(Request.Path.LastIndexOf("/") + 1));
                vintCdProxProcesso = vcmpAnalise.ProximoProcessoAnalise(vintCdTransacao, int.Parse(hdfCdUsuario.Value), ref vintCdAnalise);
                return vintCdProxProcesso;
            }
            catch (Exception Ex)
            {
                Mensagem = (wucMensagens)Page.Master.FindControl("wucMasterMensagens");
                Mensagem.ExibirMensagem(wucMensagens.TipoAlerta.Erro, Ex.Source, Ex.Message, Ex.StackTrace);
            }
        }
And yet in design, gives me this mistake:
Not all code paths Return a value
This always happens when I try a Return inside a Try... catch block. What should I do to resolve this?
The function requires a return. Inside the Try you have one, but if you fall into the error and enter the catch you have no return. Hence the error.
– Joao Paulo
Related: not all code paths Return a value
– Guilherme Nascimento
That answer might help you What Try/Catch Blocks are for and when they should be used?
– DNick