godotVmcSharp/Exceptions/DataOutOfRangeException.cs

18 lines
1.0 KiB
C#
Raw Normal View History

using System;
using godotOscSharp;
namespace godotVmcSharp
{
public class DataOutOfRangeException : ArgumentOutOfRangeException
{
public DataOutOfRangeException(String address, int index, String name, String expected, object actual): base($"{address}[{index}] {name}", actual, expected)
{}
public DataOutOfRangeException(String address, int index, String name, String expected, object actual, Exception inner): base($"{address}[{index}] {name} has data out of range. Received '{actual}', expected within range '{expected}'.", inner)
{}
public DataOutOfRangeException(OscAddress address, int index, String name, String expected, object actual): base($"{address.ToString()}[{index}] {name}", actual, expected)
{}
public DataOutOfRangeException(OscAddress address, int index, String name, String expected, object actual, Exception inner): base($"{address.ToString()}[{index}] {name} has data out of range. Received '{actual}', expected within range '{expected}'.", inner)
{}
}
}