This commit is contained in:
watrabi
2025-09-18 17:55:52 -04:00
commit 977f1ff4b8
15030 changed files with 17324420 additions and 0 deletions
@@ -0,0 +1,21 @@
using System;
using Microsoft.Ccr.Core;
namespace Roblox.Ccr
{
public class ExceptionPort<T> : PortSet<T, Exception>
{
public static implicit operator T(ExceptionPort<T> port)
{
var ex = (Exception)port.P1.Test();
if (ex != null) throw ex;
return (T) port.P0.Test();
}
public void Check()
{
var ex = (Exception)P1.Test();
if (ex != null) throw ex;
}
}
}