mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
28
Brutal.Slang/SlangException.cs
Normal file
28
Brutal.Slang/SlangException.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
namespace Brutal.SlangApi;
|
||||
|
||||
/// <summary>
|
||||
/// Thrown by the throwing form of generated COM-interface extension methods when an
|
||||
/// underlying call returns a failing <see cref="Result"/>.
|
||||
/// </summary>
|
||||
public sealed class SlangException : Exception
|
||||
{
|
||||
public Result Result { get; }
|
||||
|
||||
public SlangException(Result result)
|
||||
: base($"Slang call failed with result {result}.")
|
||||
{
|
||||
Result = result;
|
||||
}
|
||||
|
||||
public SlangException(Result result, string message)
|
||||
: base(message)
|
||||
{
|
||||
Result = result;
|
||||
}
|
||||
|
||||
public SlangException(Result result, string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
Result = result;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue