-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ts3Exceptions.cs
30 lines (26 loc) · 1.13 KB
/
Ts3Exceptions.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
// TS3Client - A free TeamSpeak3 client implementation
// Copyright (C) 2017 TS3Client contributors
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the Open Software License v. 3.0
//
// You should have received a copy of the Open Software License along with this
// program. If not, see <https://opensource.org/licenses/OSL-3.0>.
namespace TS3Client
{
using Messages;
using System;
/// <summary>Generel exeption when methods within the client fail.</summary>
public class Ts3Exception : Exception
{
public Ts3Exception(string message) : base(message) { }
public Ts3Exception(string message, Exception innerException) : base(message, innerException) { }
}
/// <summary>Exception when commands return an error code from the server.</summary>
public class Ts3CommandException : Ts3Exception
{
public CommandError ErrorStatus { get; }
internal Ts3CommandException(CommandError message) : base(message.ErrorFormat()) { ErrorStatus = message; }
internal Ts3CommandException(CommandError message, Exception inner) : base(message.ErrorFormat(), inner) { ErrorStatus = message; }
}
}