This commit is contained in:
Robert 2023-12-29 09:46:33 +04:00
parent b66ac1589e
commit 2c1605cadc
2 changed files with 40 additions and 0 deletions

View File

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

View File

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