Добавил свою реализацию ошибки

This commit is contained in:
bekodeg 2024-09-11 11:43:29 +04:00
parent b980ebabe8
commit 787de84492
3 changed files with 13 additions and 6 deletions

View File

@ -1,4 +1,6 @@
namespace Cop.Borovkov.Var3.Components
using Cop.Borovkov.Var3.Exceptions;
namespace Cop.Borovkov.Var3.Components
{
public partial class CustomNumericInputField : UserControl
{
@ -48,7 +50,7 @@
return value;
}
throw new InvalidOperationException();
throw new InvalidNumericInputValueException();
}
set
{

View File

@ -7,8 +7,4 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<Folder Include="Exceptions\" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,9 @@
namespace Cop.Borovkov.Var3.Exceptions
{
public class InvalidNumericInputValueException : Exception
{
public InvalidNumericInputValueException() { }
public InvalidNumericInputValueException(string message) : base(message) { }
}
}