VCCLCompilerTool.ExceptionHandling Propriedade

Definição

Obtém ou define um valor usado para chamadas a destruidores para objetos automáticos durante um desenrolamento de pilha causado por uma exceção gerada. ExceptionHandling expõe a funcionalidade da opção /eh (modelo de tratamento de exceção) do compilador.

public:
 property Microsoft::VisualStudio::VCProjectEngine::cppExceptionHandling ExceptionHandling { Microsoft::VisualStudio::VCProjectEngine::cppExceptionHandling get(); void set(Microsoft::VisualStudio::VCProjectEngine::cppExceptionHandling value); };
public:
 property Microsoft::VisualStudio::VCProjectEngine::cppExceptionHandling ExceptionHandling { Microsoft::VisualStudio::VCProjectEngine::cppExceptionHandling get(); void set(Microsoft::VisualStudio::VCProjectEngine::cppExceptionHandling value); };
[System.Runtime.InteropServices.DispId(122)]
public Microsoft.VisualStudio.VCProjectEngine.cppExceptionHandling ExceptionHandling { [System.Runtime.InteropServices.DispId(122)] get; [System.Runtime.InteropServices.DispId(122)] set; }
[<System.Runtime.InteropServices.DispId(122)>]
[<get: System.Runtime.InteropServices.DispId(122)>]
[<set: System.Runtime.InteropServices.DispId(122)>]
member this.ExceptionHandling : Microsoft.VisualStudio.VCProjectEngine.cppExceptionHandling with get, set
Public Property ExceptionHandling As cppExceptionHandling

Valor da propriedade

cppExceptionHandling

Um valor cppExceptionHandling.

Atributos

Exemplos

Consulte como compilar código de exemplo para extensibilidade de modelo de projeto para obter informações sobre como compilar e executar este exemplo.

O exemplo a seguir modifica a ExceptionHandling propriedade no ambiente de desenvolvimento integrado (IDE):

' add reference to Microsoft.VisualStudio.VCProjectEngine.  
Imports EnvDTE  
Imports Microsoft.VisualStudio.VCProjectEngine  

Public Module Module1  
    Sub Test()  
        Dim prj As VCProject  
        Dim cfgs, tools As IVCCollection  
        Dim cfg As VCConfiguration  
        Dim tool As VCCLCompilerTool  
        prj = DTE.Solution.Projects.Item(1).Object  
        cfgs = prj.Configurations  
        cfg = cfgs.Item(1)  
        tool = cfg.Tools("VCCLCompilerTool")  
        tool.ExceptionHandling = True  
    End Sub  
End Module  

Aplica-se a