forked from pya-h/PassengerTraffix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCustomExceptions.cs
27 lines (24 loc) · 1.05 KB
/
CustomExceptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PassengerTraffix
{
class DatabaseOutOfReachException : Exception
{
public DatabaseOutOfReachException() : base("اتصال به پایگاه داده با مشکل مواجه شد! در صورتی که نمیدانید مشکل از کجاست به واحد فاوا مراجعه فرمایید.") { }
}
class FillRequiredFieldsException : Exception
{
public FillRequiredFieldsException(string emptyFields) : base("فیلدهای زیر را بصورت کامل پر کنید:\n" + emptyFields) { }
}
class WrongCredentialsException : Exception
{
public WrongCredentialsException() : base("رمز عبور وارد شده اشتباه است!") { }
}
class InvalidInputException : Exception
{
public InvalidInputException(string fieldName, string cuase) : base(string.Format("{0} باید {1} باشد!", fieldName, cuase)) { }
}
}