Line data Source code
1 : #region Copyright
2 : // // -----------------------------------------------------------------------
3 : // // <copyright company="Chinchilla Software Limited">
4 : // // Copyright Chinchilla Software Limited. All rights reserved.
5 : // // </copyright>
6 : // // -----------------------------------------------------------------------
7 : #endregion
8 :
9 : using System;
10 :
11 : namespace Cqrs.WebApi.Formatters.FormMultipart.Infrastructure.Logger
12 : {
13 : /// <summary>
14 : /// Provide a mechanism to log issues and <see cref="Exception"/> data during conversions.
15 : /// </summary>
16 : public interface IFormDataConverterLogger
17 : {
18 : /// <summary>
19 : /// Logs an error.
20 : /// </summary>
21 : /// <param name="errorPath">The path to the member for which the error is being logged.</param>
22 : /// <param name="exception">The exception to be logged.</param>
23 1 : void LogError(string errorPath, Exception exception);
24 :
25 : /// <summary>
26 : /// Logs an error.
27 : /// </summary>
28 : /// <param name="errorPath">The path to the member for which the error is being logged.</param>
29 : /// <param name="errorMessage">The error message to be logged.</param>
30 1 : void LogError(string errorPath, string errorMessage);
31 :
32 : /// <summary>
33 : /// Throw exception if errors found
34 : /// </summary>
35 1 : void EnsureNoErrors();
36 : }
37 : }
|