You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.0 KiB
39 lines
1.0 KiB
3 years ago
|
using Microsoft.Extensions.Logging;
|
||
|
using System;
|
||
|
using System.Runtime.Serialization;
|
||
|
using Volo.Abp;
|
||
|
using Volo.Abp.Logging;
|
||
|
|
||
|
namespace Sanhe.Abp.Identity
|
||
|
{
|
||
|
public class IdentityException : BusinessException, IExceptionWithSelfLogging
|
||
|
{
|
||
|
public IdentityException(
|
||
|
SerializationInfo serializationInfo,
|
||
|
StreamingContext context)
|
||
|
: base(serializationInfo, context)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public IdentityException(
|
||
|
string code = null,
|
||
|
string message = null,
|
||
|
string details = null,
|
||
|
Exception innerException = null,
|
||
|
LogLevel logLevel = LogLevel.Warning)
|
||
|
: base(code, message, details, innerException, logLevel)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public virtual void Log(ILogger logger)
|
||
|
{
|
||
|
logger.Log(
|
||
|
LogLevel,
|
||
|
"An id error occurred,code: {0}, Message: {1}, Details: {2}",
|
||
|
Code,
|
||
|
Message,
|
||
|
Details);
|
||
|
}
|
||
|
}
|
||
|
}
|