43 lines
1.6 KiB
C#
43 lines
1.6 KiB
C#
namespace bts.BlueOrb;
|
|
|
|
using System;
|
|
|
|
public class SchemaValidationException : Exception {
|
|
public SchemaValidationException(string message) : base(message) { }
|
|
}
|
|
|
|
static class SchemaValidationExceptionFactory {
|
|
public static SchemaValidationException NoColumns() =>
|
|
new("IBlueTableSchema has no columns");
|
|
|
|
public static SchemaValidationException NoIdColumn() =>
|
|
new("IBlueTableSchema has no id column");
|
|
|
|
public static SchemaValidationException IdColumnInvalidType(Type type) =>
|
|
new($"IBlueTableSchema id column has invalid type {type}");
|
|
|
|
public static SchemaValidationException Null() =>
|
|
new("IBlueTableSchema is null");
|
|
|
|
public static SchemaValidationException NullColumn() =>
|
|
new("IBlueTableSchema has null column");
|
|
|
|
public static SchemaValidationException NullOrEmptyColumns() =>
|
|
new("IBlueTableSchema columnInfo array is null/empty");
|
|
|
|
public static SchemaValidationException NullOrEmptyColumnNames() =>
|
|
new("IBlueTableSchema columnNames array is null/empty");
|
|
|
|
public static SchemaValidationException NullEmptyWhitespaceColumnName() =>
|
|
new("IBlueTableSchema columnName is null/empty/whitespace");
|
|
|
|
public static SchemaValidationException DuplicateColumnName() =>
|
|
new("IBlueTableSchema has duplicate column names");
|
|
|
|
public static SchemaValidationException MismatchedColumnNames() =>
|
|
new("IBlueTableSchema columnNames array does not match names in columnInfo array");
|
|
|
|
public static SchemaValidationException MismatchedColumnIndices() =>
|
|
new("IBlueTableSchema column numbers do not match corresponding indices");
|
|
}
|