Skip to content

Commit 496fd6b

Browse files
committed
Exceptions
Added FirstNoArgument and UnknownArgument Exceptions
1 parent 000d475 commit 496fd6b

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
using System.Runtime.Serialization;
3+
4+
namespace ProgramArgumentsManager.Exceptions
5+
{
6+
[Serializable]
7+
public class FirstNoArgumentException : Exception
8+
{
9+
public FirstNoArgumentException() { }
10+
public FirstNoArgumentException(string message) : base(message) { }
11+
public FirstNoArgumentException(string message, Exception inner) : base(message, inner) { }
12+
protected FirstNoArgumentException(SerializationInfo info, StreamingContext context) : base(info, context) { }
13+
}
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
using System.Runtime.Serialization;
3+
4+
namespace ProgramArgumentsManager.Exceptions
5+
{
6+
[Serializable]
7+
public class UnknownArgumentException : Exception
8+
{
9+
public string Argument;
10+
11+
public UnknownArgumentException(string argument, string message) : base(message) { Argument = argument; }
12+
protected UnknownArgumentException(SerializationInfo info, StreamingContext context) : base(info, context) { }
13+
}
14+
}

ProgramArgumentsManager/ProgramArgumentsManager.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@
4646
<ItemGroup>
4747
<Compile Include="ArgumentsManager.cs" />
4848
<Compile Include="Exceptions\ArgumentRequiredException.cs" />
49+
<Compile Include="Exceptions\UnknownArgumentException.cs" />
50+
<Compile Include="Exceptions\FirstNoArgumentException.cs" />
4951
<Compile Include="Properties\AssemblyInfo.cs" />
5052
</ItemGroup>
51-
<ItemGroup />
5253
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
5354
</Project>

0 commit comments

Comments
 (0)