PostSharp 6.5 / / Post­Sharp Documentation / 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.5.19.0 (6.5.19.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