-
Notifications
You must be signed in to change notification settings - Fork 374
/
Copy pathDiagnosticsClientExceptions.cs
44 lines (37 loc) · 1.59 KB
/
DiagnosticsClientExceptions.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
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
namespace Microsoft.Diagnostics.NETCore.Client
{
public class DiagnosticsClientException : Exception
{
public DiagnosticsClientException(string msg) : base(msg) { }
public DiagnosticsClientException(string msg, Exception exception) : base(msg, exception) { }
}
// When a certian command is not supported by either the library or the target process' runtime
public class UnsupportedProtocolException : DiagnosticsClientException
{
public UnsupportedProtocolException(string msg) : base(msg) { }
}
// When the runtime is no longer availble for attaching.
public class ServerNotAvailableException : DiagnosticsClientException
{
public ServerNotAvailableException(string msg) : base(msg) { }
public ServerNotAvailableException(string msg, Exception exception) : base(msg, exception) { }
}
// When the runtime responded with an error
public class ServerErrorException : DiagnosticsClientException
{
public ServerErrorException(string msg) : base(msg) { }
}
// When the runtime doesn't support the command
public class UnsupportedCommandException : ServerErrorException
{
public UnsupportedCommandException(string msg) : base(msg) { }
}
// When the runtime already has loaded profiler
public class ProfilerAlreadyActiveException : ServerErrorException
{
public ProfilerAlreadyActiveException(string msg) : base(msg) { }
}
}