mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-26 21:15:47 +00: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}\".");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|