Add UndecidedEndiannessError

This commit is contained in:
Petr Pucil 2020-03-21 22:08:21 +01:00
parent 44fb5ae5f2
commit 152ddd9dd8
1 changed files with 20 additions and 0 deletions

View File

@ -36,6 +36,26 @@ namespace Kaitai
byte[] Decode(byte[] src);
}
/// <summary>
/// Error that occurs when default endianness should be decided with a
/// switch, but nothing matches (although using endianness expression
/// implies that there should be some positive result).
/// </summary>
public class UndecidedEndiannessError : Exception {
public UndecidedEndiannessError()
: base("Unable to decide on endianness")
{
}
public UndecidedEndiannessError(string msg)
: base(msg)
{
}
public UndecidedEndiannessError(string msg, Exception inner)
: base(msg, inner)
{
}
}
/// <summary>
/// Common ancestor for all error originating from Kaitai Struct usage.
/// Stores KSY source path, pointing to an element supposedly guilty of