Files
RobustToolbox/Robust.Shared/Prototypes/Exceptions.cs
Pieter-Jan Briers 816a535a92 Fix obsoletion warnings for BinaryFormatter stuff
This became an outright warning in .NET 8. Into the trash, never used it.
2023-12-15 19:37:13 +01:00

37 lines
765 B
C#

using System;
using System.Runtime.Serialization;
namespace Robust.Shared.Prototypes;
[Serializable]
[Virtual]
public class PrototypeLoadException : Exception
{
public PrototypeLoadException()
{
}
public PrototypeLoadException(string message) : base(message)
{
}
public PrototypeLoadException(string message, Exception inner) : base(message, inner)
{
}
}
[Serializable]
[Virtual]
public class UnknownPrototypeException : Exception
{
public override string Message => $"Unknown {Kind.Name} prototype: {Prototype}" ;
public readonly string Prototype;
public readonly Type Kind;
public UnknownPrototypeException(string prototype, Type kind)
{
Prototype = prototype;
Kind = kind;
}
}