From 9768aa7713826d49a6c2ea1025caa4b87d62e5e8 Mon Sep 17 00:00:00 2001 From: vnugent Date: Thu, 2 Nov 2023 01:50:05 -0400 Subject: also carried away --- .../ConcreteTypeAmbiguousMatchException.cs | 44 ++++++++++++++++++++++ .../src/Exceptions/ConcreteTypeException.cs | 44 ++++++++++++++++++++++ .../Exceptions/ConcreteTypeNotFoundException.cs | 41 ++++++++++++++++++++ .../Exceptions/ConfigurationValidationException.cs | 42 +++++++++++++++++++++ .../src/Exceptions/MissingDependencyException.cs | 41 ++++++++++++++++++++ 5 files changed, 212 insertions(+) create mode 100644 lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/ConcreteTypeAmbiguousMatchException.cs create mode 100644 lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/ConcreteTypeException.cs create mode 100644 lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/ConcreteTypeNotFoundException.cs create mode 100644 lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/ConfigurationValidationException.cs create mode 100644 lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/MissingDependencyException.cs (limited to 'lib/VNLib.Plugins.Extensions.Loading/src/Exceptions') diff --git a/lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/ConcreteTypeAmbiguousMatchException.cs b/lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/ConcreteTypeAmbiguousMatchException.cs new file mode 100644 index 0000000..6118b64 --- /dev/null +++ b/lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/ConcreteTypeAmbiguousMatchException.cs @@ -0,0 +1,44 @@ +/* +* Copyright (c) 2023 Vaughn Nugent +* +* Library: VNLib +* Package: VNLib.Plugins.Extensions.Loading +* File: ConcreteTypeAmbiguousMatchException.cs +* +* ConcreteTypeAmbiguousMatchException.cs is part of VNLib.Plugins.Extensions.Loading +* which is part of the larger VNLib collection of libraries and utilities. +* +* VNLib.Plugins.Extensions.Loading is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as +* published by the Free Software Foundation, either version 3 of the +* License, or (at your option) any later version. +* +* VNLib.Plugins.Extensions.Loading is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with this program. If not, see https://www.gnu.org/licenses/. +*/ + +using System; + +namespace VNLib.Plugins.Extensions.Loading +{ + /// + /// Raised when a concrete type is found but is ambiguous because more than one + /// type implements the desired abstract type. + /// + public sealed class ConcreteTypeAmbiguousMatchException : ConcreteTypeException + { + public ConcreteTypeAmbiguousMatchException(string message) : base(message) + { } + + public ConcreteTypeAmbiguousMatchException(string message, Exception innerException) : base(message, innerException) + { } + + public ConcreteTypeAmbiguousMatchException() + { } + } +} diff --git a/lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/ConcreteTypeException.cs b/lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/ConcreteTypeException.cs new file mode 100644 index 0000000..29f080a --- /dev/null +++ b/lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/ConcreteTypeException.cs @@ -0,0 +1,44 @@ +/* +* Copyright (c) 2023 Vaughn Nugent +* +* Library: VNLib +* Package: VNLib.Plugins.Extensions.Loading +* File: ConcreteTypeException.cs +* +* ConcreteTypeException.cs is part of VNLib.Plugins.Extensions.Loading +* which is part of the larger VNLib collection of libraries and utilities. +* +* VNLib.Plugins.Extensions.Loading is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as +* published by the Free Software Foundation, either version 3 of the +* License, or (at your option) any later version. +* +* VNLib.Plugins.Extensions.Loading is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with this program. If not, see https://www.gnu.org/licenses/. +*/ + +using System; + +namespace VNLib.Plugins.Extensions.Loading +{ + /// + /// Base class for concrete type loading exceptions. Raised when searching + /// for a concrete type fails. + /// + public class ConcreteTypeException : TypeLoadException + { + public ConcreteTypeException() : base() + { } + + public ConcreteTypeException(string? message) : base(message) + { } + + public ConcreteTypeException(string? message, Exception? innerException) : base(message, innerException) + { } + } +} diff --git a/lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/ConcreteTypeNotFoundException.cs b/lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/ConcreteTypeNotFoundException.cs new file mode 100644 index 0000000..523726b --- /dev/null +++ b/lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/ConcreteTypeNotFoundException.cs @@ -0,0 +1,41 @@ +/* +* Copyright (c) 2023 Vaughn Nugent +* +* Library: VNLib +* Package: VNLib.Plugins.Extensions.Loading +* File: ConcreteTypeNotFoundException.cs +* +* ConcreteTypeNotFoundException.cs is part of VNLib.Plugins.Extensions.Loading +* which is part of the larger VNLib collection of libraries and utilities. +* +* VNLib.Plugins.Extensions.Loading is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as +* published by the Free Software Foundation, either version 3 of the +* License, or (at your option) any later version. +* +* VNLib.Plugins.Extensions.Loading is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with this program. If not, see https://www.gnu.org/licenses/. +*/ + +using System; + +namespace VNLib.Plugins.Extensions.Loading +{ + /// + /// The requested concrete type was not found in the assembly + /// + public sealed class ConcreteTypeNotFoundException : ConcreteTypeException + { + public ConcreteTypeNotFoundException(string message) : base(message) + { } + public ConcreteTypeNotFoundException(string message, Exception innerException) : base(message, innerException) + { } + public ConcreteTypeNotFoundException() + { } + } +} diff --git a/lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/ConfigurationValidationException.cs b/lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/ConfigurationValidationException.cs new file mode 100644 index 0000000..ebf4d9e --- /dev/null +++ b/lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/ConfigurationValidationException.cs @@ -0,0 +1,42 @@ +/* +* Copyright (c) 2023 Vaughn Nugent +* +* Library: VNLib +* Package: VNLib.Plugins.Extensions.Loading +* File: ConfigurationValidationException.cs +* +* ConfigurationValidationException.cs is part of VNLib.Plugins.Extensions.Loading which is part of the larger +* VNLib collection of libraries and utilities. +* +* VNLib.Plugins.Extensions.Loading is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as +* published by the Free Software Foundation, either version 3 of the +* License, or (at your option) any later version. +* +* VNLib.Plugins.Extensions.Loading is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with this program. If not, see https://www.gnu.org/licenses/. +*/ + +using System; + +namespace VNLib.Plugins.Extensions.Loading +{ + /// + /// An exception raised when a configuration validation exception has occured + /// + public class ConfigurationValidationException : Exception + { + public ConfigurationValidationException(string message) : base(message) + {} + + public ConfigurationValidationException(string message, Exception innerException) : base(message, innerException) + {} + public ConfigurationValidationException() + {} + } +} diff --git a/lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/MissingDependencyException.cs b/lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/MissingDependencyException.cs new file mode 100644 index 0000000..b07badc --- /dev/null +++ b/lib/VNLib.Plugins.Extensions.Loading/src/Exceptions/MissingDependencyException.cs @@ -0,0 +1,41 @@ +/* +* Copyright (c) 2023 Vaughn Nugent +* +* Library: VNLib +* Package: VNLib.Plugins.Extensions.Loading +* File: MissingDependencyException.cs +* +* MissingDependencyException.cs is part of VNLib.Plugins.Extensions.Loading +* which is part of the larger VNLib collection of libraries and utilities. +* +* VNLib.Plugins.Extensions.Loading is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as +* published by the Free Software Foundation, either version 3 of the +* License, or (at your option) any later version. +* +* VNLib.Plugins.Extensions.Loading is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with this program. If not, see https://www.gnu.org/licenses/. +*/ + +using System; + +namespace VNLib.Plugins.Extensions.Loading +{ + /// + /// Raised when a required dependency is missing and the program cannot continue + /// + public sealed class MissingDependencyException : Exception + { + public MissingDependencyException(string message) : base(message) + { } + public MissingDependencyException(string message, Exception innerException) : base(message, innerException) + { } + public MissingDependencyException() + { } + } +} -- cgit