Fixed csproj's reference to HttpException
This commit is contained in:
@@ -88,9 +88,6 @@
|
|||||||
<Compile Include="..\Discord.Net\Helpers\Http.cs">
|
<Compile Include="..\Discord.Net\Helpers\Http.cs">
|
||||||
<Link>Helpers\Http.cs</Link>
|
<Link>Helpers\Http.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="..\Discord.Net\Helpers\HttpException.cs">
|
|
||||||
<Link>Helpers\HttpException.cs</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\Discord.Net\Invite.cs">
|
<Compile Include="..\Discord.Net\Invite.cs">
|
||||||
<Link>Invite.cs</Link>
|
<Link>Invite.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -112,6 +109,7 @@
|
|||||||
<Compile Include="..\Discord.Net\User.cs">
|
<Compile Include="..\Discord.Net\User.cs">
|
||||||
<Link>User.cs</Link>
|
<Link>User.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="HttpException.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
|||||||
16
src/Discord.Net.Net45/HttpException.cs
Normal file
16
src/Discord.Net.Net45/HttpException.cs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
|
namespace Discord
|
||||||
|
{
|
||||||
|
public class HttpException : Exception
|
||||||
|
{
|
||||||
|
public HttpStatusCode StatusCode { get; }
|
||||||
|
|
||||||
|
public HttpException(HttpStatusCode statusCode)
|
||||||
|
: base($"The server responded with error {statusCode}")
|
||||||
|
{
|
||||||
|
StatusCode = statusCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user