mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-10-01 12:30:00 +02: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}\".");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|