конец

This commit is contained in:
ALINA_KURBANOVA 2023-12-29 18:48:32 +04:00
parent 75771bbd50
commit a1cb51e02c
3 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,16 @@
using System.Runtime.Serialization;
namespace WarmlyLocomotive.Exceptions
{
[Serializable]
internal class StorageOverflowException : ApplicationException
{
public StorageOverflowException(int count) : base($"В наборе превышено допустимое количество: {count}") { }
public StorageOverflowException() : base() { }
public StorageOverflowException(string message) : base(message) { }
public StorageOverflowException(string message, Exception exception)
: base(message, exception) { }
protected StorageOverflowException(SerializationInfo info,
StreamingContext contex) : base(info, contex) { }
}
}

View File

@ -0,0 +1,15 @@
using System.Runtime.Serialization;
namespace WarmlyLocomotive.Exceptions
{
[Serializable]
internal class WarmlyLocomotiveNotFoundException : ApplicationException
{
public WarmlyLocomotiveNotFoundException(int i) : base($"Не найден объект по позиции {i}") { }
public WarmlyLocomotiveNotFoundException() : base() { }
public WarmlyLocomotiveNotFoundException(string message) : base(message) { }
public WarmlyLocomotiveNotFoundException(string message, Exception exception) : base(message, exception)
{ }
protected WarmlyLocomotiveNotFoundException(SerializationInfo info,
StreamingContext contex) : base(info, contex) { }
}
}

View File

@ -0,0 +1,15 @@
{
"Serilog": {
"Using": [ "Serilog.Sinks.File" ],
"MinimumLevel": "Debug",
"WriteTo": [
{
"Name": "File",
"Args": { "path": "log.txt" }
}
],
"Properties": {
"Application": "Sample"
}
}
}