добавление классов-наследников от Exception
This commit is contained in:
parent
13d9bfb23d
commit
f3a61092eb
20
Stormtrooper/Stormtrooper/StorageOverflowException.cs
Normal file
20
Stormtrooper/Stormtrooper/StorageOverflowException.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Stormtrooper
|
||||
{
|
||||
[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) { }
|
||||
|
||||
}
|
||||
}
|
19
Stormtrooper/Stormtrooper/StormtrooperNotFoundException.cs
Normal file
19
Stormtrooper/Stormtrooper/StormtrooperNotFoundException.cs
Normal 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 Stormtrooper
|
||||
{
|
||||
[Serializable]
|
||||
internal class StormtrooperNotFoundException : ApplicationException
|
||||
{
|
||||
public StormtrooperNotFoundException(int i) : base($"Не найден объект по позиции {i}") { }
|
||||
public StormtrooperNotFoundException() : base("Выход за границы") { }
|
||||
public StormtrooperNotFoundException(string message) : base(message) { }
|
||||
public StormtrooperNotFoundException(string message, Exception exception) : base(message, exception) { }
|
||||
protected StormtrooperNotFoundException(SerializationInfo info, StreamingContext contex) : base(info, contex) { }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user