-
Notifications
You must be signed in to change notification settings - Fork 0
/
myExceptions.cs
executable file
·85 lines (73 loc) · 2.29 KB
/
myExceptions.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PokemonTCG
{
public class myExceptions
{
// Base exception which all custom exceptions should inherit from
public class BaseStepException : ApplicationException
{
private string _customMessage;
// Gets or Sets the custom error message detailing the error
public string CustomMessage
{
get { return this._customMessage; }
set { this._customMessage = value; }
}
}
/*
// Exception resulting from a failure in the FTP cleanup process
public class FTPCleanupException : BaseStepException
{
// Constructor (default error message)
public FTPCleanupException()
{
this.CustomMessage = "Exception cleaning-up the temporary files in the FTP process.";
}
/// Overloaded constructor (initialize custom error message)
public FTPCleanupException(string strCustomMessage)
{
this.CustomMessage = strCustomMessage;
}
}
* */
//Invaild Deck Exception
public class InvalidDeckException : BaseStepException
{
//Constructor
public InvalidDeckException()
{
this.CustomMessage = "An Invalid Deck was selected.";
}
//Overloaded Constructor
public InvalidDeckException(string str)
{
this.CustomMessage = str;
}
}
public class DeckNotFoundException : BaseStepException
{
public DeckNotFoundException()
{
this.CustomMessage = "Deck Not Found";
}
public DeckNotFoundException(string str)
{
this.CustomMessage = str;
}
}
public class InvalidEnergyTypeException : BaseStepException
{
public InvalidEnergyTypeException()
{
this.CustomMessage = "Invalid energy type!";
}
public InvalidEnergyTypeException(string str)
{
this.CustomMessage = str;
}
}
}
}