AppVeyorProviderAddMessageExtensions.

AddErrorMessage(IAppVeyorProvider, string, Exception) Method

Summary

Adds a warning message to the AppVeyor build log.

Syntax

public static void AddErrorMessage(this IAppVeyorProvider provider, string message, Exception exception)

Examples

if (BuildSystem.AppVeyor.IsRunningOnAppVeyor)
{
    try
    {
        // Do work...
    }
    catch (Exception ex)
    {
        BuildSystem.AppVeyor.AddErrorMessage("Publish failed", ex);
        throw;
    }
}
if (AppVeyor.IsRunningOnAppVeyor)
{
    try
    {
        // Do work...
    }
    catch (Exception ex)
    {
        AppVeyor.AddErrorMessage("Publish failed", ex);
        throw;
    }
}

Parameters

Name Type Description
provider IAppVeyorProvider The AppVeyor provider.
message string The message.
exception Exception The exception.

Return Value

Type Description
void