mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-14 11:02:52 +01:00
17 lines
353 B
C#
17 lines
353 B
C#
|
using System;
|
||
|
using Silk.NET.Vulkan;
|
||
|
|
||
|
namespace Ryujinx.Ava.Ui.Vulkan
|
||
|
{
|
||
|
public static class ResultExtensions
|
||
|
{
|
||
|
public static void ThrowOnError(this Result result)
|
||
|
{
|
||
|
if (result != Result.Success)
|
||
|
{
|
||
|
throw new Exception($"Unexpected API error \"{result}\".");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|