mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-28 19:46:24 +02:00
Move solution and projects to src
This commit is contained in:
parent
cd124bda58
commit
cee7121058
3466 changed files with 55 additions and 55 deletions
41
src/Ryujinx.Graphics.Vulkan/VulkanException.cs
Normal file
41
src/Ryujinx.Graphics.Vulkan/VulkanException.cs
Normal file
|
@ -0,0 +1,41 @@
|
|||
using Silk.NET.Vulkan;
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Ryujinx.Graphics.Vulkan
|
||||
{
|
||||
static class ResultExtensions
|
||||
{
|
||||
public static void ThrowOnError(this Result result)
|
||||
{
|
||||
// Only negative result codes are errors.
|
||||
if ((int)result < (int)Result.Success)
|
||||
{
|
||||
throw new VulkanException(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class VulkanException : Exception
|
||||
{
|
||||
public VulkanException()
|
||||
{
|
||||
}
|
||||
|
||||
public VulkanException(Result result) : base($"Unexpected API error \"{result}\".")
|
||||
{
|
||||
}
|
||||
|
||||
public VulkanException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public VulkanException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
protected VulkanException(SerializationInfo info, StreamingContext context) : base(info, context)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue