ExceptionLogger.

LogException<T>(ICakeLog, T) Method

Summary

Logs exception and returns exit code if available in exception.
Namespace
Cake.Cli
Containing Type
ExceptionLogger

Syntax

public static int LogException<T>(this ICakeLog log, T ex) where T : Exception

Type Parameters

Name Description
T The exception type.

Parameters

Name Type Description
log ICakeLog The log.
ex T The exception.

Return Value

Type Description
int 1 or exit code provided by ExitCode.