mirror of
https://github.com/Sarsoo/IF.Lastfm.git
synced 2024-10-17 07:13:09 +01:00
Removed the LastFmApiException class, it was a terrible idea
This commit is contained in:
parent
ea0142d269
commit
40774bcf6a
@ -29,23 +29,11 @@ private static void Main(string[] args)
|
|||||||
catch (AggregateException agg)
|
catch (AggregateException agg)
|
||||||
{
|
{
|
||||||
foreach (var ex in agg.InnerExceptions)
|
foreach (var ex in agg.InnerExceptions)
|
||||||
{
|
|
||||||
System.Console.WriteLine("\n====================\n");
|
|
||||||
if (ex is LastFmApiException)
|
|
||||||
{
|
|
||||||
var lex = ex as LastFmApiException;
|
|
||||||
System.Console.WriteLine("LastFmApiException thrown:\n {0}\n {1}",
|
|
||||||
lex.Error.GetApiName(),
|
|
||||||
lex.StackTrace);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
System.Console.WriteLine("Exception thrown:\n {0}\n {1}",
|
System.Console.WriteLine("Exception thrown:\n {0}\n {1}",
|
||||||
ex.Message,
|
ex.Message,
|
||||||
ex.StackTrace);
|
ex.StackTrace);
|
||||||
}
|
}
|
||||||
System.Console.WriteLine("\n====================\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
System.Console.ReadLine();
|
System.Console.ReadLine();
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
using System;
|
|
||||||
using IF.Lastfm.Core.Api.Enums;
|
|
||||||
|
|
||||||
namespace IF.Lastfm.Core.Api.Helpers
|
|
||||||
{
|
|
||||||
public class LastFmApiException : Exception
|
|
||||||
{
|
|
||||||
public LastFmApiError Error { get; set; }
|
|
||||||
|
|
||||||
public LastFmApiException(LastFmApiError error)
|
|
||||||
{
|
|
||||||
Error = error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -59,7 +59,6 @@
|
|||||||
<Compile Include="ILastFm.cs" />
|
<Compile Include="ILastFm.cs" />
|
||||||
<Compile Include="LastFm.cs" />
|
<Compile Include="LastFm.cs" />
|
||||||
<Compile Include="Api\Enums\LastFmApiError.cs" />
|
<Compile Include="Api\Enums\LastFmApiError.cs" />
|
||||||
<Compile Include="Api\Helpers\LastFmApiException.cs" />
|
|
||||||
<Compile Include="Objects\Album.cs" />
|
<Compile Include="Objects\Album.cs" />
|
||||||
<Compile Include="Objects\Artist.cs" />
|
<Compile Include="Objects\Artist.cs" />
|
||||||
<Compile Include="Objects\BuyLink.cs" />
|
<Compile Include="Objects\BuyLink.cs" />
|
||||||
|
Loading…
Reference in New Issue
Block a user