GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — KeyLoad/src/KeyLoad.Abstractions/KeyLoadException.cs at main · managedcode/KeyLoad

Expand file tree

/

KeyLoadException.cs

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
64 lines (55 loc) · 2.56 KB
/

KeyLoadException.cs

Copy path

File metadata and controls

64 lines (55 loc) · 2.56 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
using ManagedCode.Communication;
namespace KeyLoad;
/// <summary>Represents a safe, caller-visible KeyLoad failure with its domain code and HTTP status.</summary>
[Orleans.GenerateSerializer]
[Orleans.Alias(KeyLoadException.RuntimeAlias)]
public sealed class KeyLoadException : Exception
{
internal const string RuntimeAlias = "keyload.error";
private const string DefaultSafeDetail = "A KeyLoad operation failed.";
/// <summary>Initializes a KeyLoad exception with the supplied domain code, safe detail, and HTTP status.</summary>
/// <param name="code">Identifies the domain error.</param>
/// <param name="safeDetail">Provides safe caller-visible detail.</param>
/// <param name="statusCode">Provides the HTTP status associated with the error.</param>
public KeyLoadException(ErrorCode code, string safeDetail, int statusCode)
: this(code, safeDetail, statusCode, null)
{
}
/// <summary>Initializes a validation exception with a standard safe detail.</summary>
public KeyLoadException() : this(ErrorCode.Validation, DefaultSafeDetail, Errors.Status(ErrorCode.Validation), null)
{
}
/// <summary>Initializes a validation exception with the supplied message.</summary>
/// <param name="message">Provides safe caller-visible failure detail.</param>
public KeyLoadException(string message) : this(ErrorCode.Validation, message, Errors.Status(ErrorCode.Validation), null)
{
}
/// <summary>Initializes a validation exception with the supplied message and cause.</summary>
/// <param name="message">Provides safe caller-visible failure detail.</param>
/// <param name="innerException">Provides the exception that caused this failure.</param>
public KeyLoadException(string message, Exception innerException)
: this(ErrorCode.Validation, message, Errors.Status(ErrorCode.Validation), innerException)
{
}
internal KeyLoadException(ErrorCode code, string safeDetail, int statusCode, Exception? innerException)
: base(safeDetail, innerException)
{
Code = code;
StatusCode = statusCode;
}
/// <summary>Gets the domain error code.</summary>
[Orleans.Id(0)]
public ErrorCode Code
{
get;
}
/// <summary>Gets the corresponding HTTP status code.</summary>
[Orleans.Id(1)]
public int StatusCode
{
get;
}
/// <summary>Creates the safe problem detail for this failure.</summary>
/// <returns>The problem detail associated with this exception.</returns>
public Problem ToProblem() => Errors.Problem(Code, Message);
}
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.