PostSharp6.1/API Reference/Post­Sharp.​Patterns.​Diagnostics.​Custom Namespace/ILogger­Exception­Handler Interface/ILogger­Exception­Handler Methods/ILogger­Exception­Handler.​On­Invalid­User­Code Method

ILoggerExceptionHandler.OnInvalidUserCode Method

Method invoked when the user code calling Logger or LogActivity is invalid, e.g. when the formatting string is incorrect or does not match the arguments.

Namespace:  PostSharp.Patterns.Diagnostics.Custom
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.1.23.0 (6.1.23.0)
Syntax
C#
void OnInvalidUserCode(
	ref CallerInfo callerInfo,
	string format,
	params Object[] args
)

Parameters

callerInfo
Type: PostSharp.Patterns.Diagnostics.Contexts.CallerInfo
Information about the line of code causing the error.
format
Type: System.String
Formatting string of the error message.
args
Type: System.Object[]
Arguments.
See Also