-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStableAbiLoadException.cs
More file actions
70 lines (59 loc) · 1.8 KB
/
Copy pathStableAbiLoadException.cs
File metadata and controls
70 lines (59 loc) · 1.8 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
namespace DotPython.Runtime.Native;
public enum StableAbiLoadPhase
{
Policy,
Manifest,
Architecture,
BridgeLoad,
ModuleLoad,
SymbolResolution,
ModuleInitialization,
Invocation,
Cleanup,
}
public sealed class StableAbiLoadException : Exception
{
public StableAbiLoadException()
: this(
"DPY8004",
StableAbiLoadPhase.ModuleLoad,
"A Stable-ABI load failure occurred.",
null,
null,
null
) { }
public StableAbiLoadException(string message)
: this("DPY8004", StableAbiLoadPhase.ModuleLoad, message, null, null, null) { }
public StableAbiLoadException(string message, Exception innerException)
: this("DPY8004", StableAbiLoadPhase.ModuleLoad, message, null, null, null, innerException)
{ }
internal StableAbiLoadException(
string code,
StableAbiLoadPhase phase,
string message,
string? artifactPath,
string? artifactSha256,
string? missingSymbol,
Exception? innerException = null,
string? pythonErrorType = null
)
: base(message, innerException)
{
Code = code;
Phase = phase;
ArtifactPath = artifactPath;
ArtifactSha256 = artifactSha256;
MissingSymbol = missingSymbol;
PythonErrorType = pythonErrorType;
}
public string Code { get; }
/// <summary>
/// The Python exception type name reported by the native module for invocation failures
/// (for example "ValueError"), when one was captured.
/// </summary>
public string? PythonErrorType { get; }
public StableAbiLoadPhase Phase { get; }
public string? ArtifactPath { get; }
public string? ArtifactSha256 { get; }
public string? MissingSymbol { get; }
}