From f1c89018ed906dd59e6bc0266d11355a0e9e046a Mon Sep 17 00:00:00 2001 From: Simon G Date: Fri, 13 Nov 2020 16:57:46 +0100 Subject: [PATCH] - add invalid and missing key exception --- GBase/Exceptions/InvalidKeyException.cs | 17 +++++++++++++++++ GBase/Exceptions/MissingKeyColumnException.cs | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 GBase/Exceptions/InvalidKeyException.cs create mode 100644 GBase/Exceptions/MissingKeyColumnException.cs diff --git a/GBase/Exceptions/InvalidKeyException.cs b/GBase/Exceptions/InvalidKeyException.cs new file mode 100644 index 0000000..c6180e1 --- /dev/null +++ b/GBase/Exceptions/InvalidKeyException.cs @@ -0,0 +1,17 @@ +// Author: Gockner, Simon +// Created: 2020-11-13 +// Copyright(c) 2020 SimonG. All Rights Reserved. + +using System; + +namespace GBase.Exceptions +{ + public class InvalidKeyException : Exception + { + public InvalidKeyException(string message) + : base(message) + { + + } + } +} \ No newline at end of file diff --git a/GBase/Exceptions/MissingKeyColumnException.cs b/GBase/Exceptions/MissingKeyColumnException.cs new file mode 100644 index 0000000..eddac6d --- /dev/null +++ b/GBase/Exceptions/MissingKeyColumnException.cs @@ -0,0 +1,17 @@ +// Author: Gockner, Simon +// Created: 2020-11-13 +// Copyright(c) 2020 SimonG. All Rights Reserved. + +using System; + +namespace GBase.Exceptions +{ + public class MissingKeyColumnException : Exception + { + public MissingKeyColumnException() + : base($"Type {typeof(T)} is missing a key column.") + { + + } + } +} \ No newline at end of file