diff --git a/RESTFulSense.Tests/Services/Coordinations/Forms/FormCoordinationServiceTests.Validations.Convert.cs b/RESTFulSense.Tests/Services/Coordinations/Forms/FormCoordinationServiceTests.Validations.Convert.cs index 1f01e868..f93c06d8 100644 --- a/RESTFulSense.Tests/Services/Coordinations/Forms/FormCoordinationServiceTests.Validations.Convert.cs +++ b/RESTFulSense.Tests/Services/Coordinations/Forms/FormCoordinationServiceTests.Validations.Convert.cs @@ -16,7 +16,7 @@ private void ShouldThrowValidationExceptionOnConvertIfModelIsInvalid() { // given object nullObject = null; - var nullObjectException = new NullObjectException(); + var nullObjectException = new NullObjectException(message:"Object is null."); var expectedFormCoordinationValidationException = new FormCoordinationValidationException( diff --git a/RESTFulSense.Tests/Services/Coordinations/Forms/FormCoordinationServiceTests.cs b/RESTFulSense.Tests/Services/Coordinations/Forms/FormCoordinationServiceTests.cs index ae0fac7a..3a92a258 100644 --- a/RESTFulSense.Tests/Services/Coordinations/Forms/FormCoordinationServiceTests.cs +++ b/RESTFulSense.Tests/Services/Coordinations/Forms/FormCoordinationServiceTests.cs @@ -83,10 +83,10 @@ public static TheoryData DependencyValidationExceptions() return new TheoryData { - new FormOrchestrationValidationException(innerException), - new FormOrchestrationDependencyValidationException(innerException), - new PropertyOrchestrationValidationException(innerException), - new PropertyOrchestrationDependencyValidationException(innerException) + new FormOrchestrationValidationException(randomMessage,innerException), + new FormOrchestrationDependencyValidationException(randomMessage,innerException), + new PropertyOrchestrationValidationException(randomMessage,innerException), + new PropertyOrchestrationDependencyValidationException(randomMessage,innerException) }; } @@ -98,10 +98,10 @@ public static TheoryData DependencyExceptions() return new TheoryData { - new FormOrchestrationDependencyException(innerException), - new FormOrchestrationServiceException(innerException), - new PropertyOrchestrationDependencyException(innerException), - new PropertyOrchestrationServiceException(innerException) + new FormOrchestrationDependencyException(randomMessage, innerException), + new FormOrchestrationServiceException(randomMessage,innerException), + new PropertyOrchestrationDependencyException(randomMessage,innerException), + new PropertyOrchestrationServiceException(randomMessage,innerException) }; } } diff --git a/RESTFulSense.Tests/Services/Orchestrations/Forms/FormOrchestrationServiceTests.Exceptions.Build.cs b/RESTFulSense.Tests/Services/Orchestrations/Forms/FormOrchestrationServiceTests.Exceptions.Build.cs index 8e229037..68104b97 100644 --- a/RESTFulSense.Tests/Services/Orchestrations/Forms/FormOrchestrationServiceTests.Exceptions.Build.cs +++ b/RESTFulSense.Tests/Services/Orchestrations/Forms/FormOrchestrationServiceTests.Exceptions.Build.cs @@ -114,8 +114,8 @@ private void ShouldThrowDependencyExceptionOnBuildIfDependencyErrorOccurs( var expectedFormOrchestrationDependencyException = new FormOrchestrationDependencyException( - message: "Form orchestration dependency error occurred, fix errors and try again.", - innerException: dependancyException); + message: "Form orchestration dependency validation error occurred, fix the errors and try again.", + innerException: dependancyException); this.attributeServiceMock.Setup(service => service.RetrieveAttribute(It.IsAny())) diff --git a/RESTFulSense.Tests/Services/Orchestrations/Forms/FormOrchestrationServiceTests.cs b/RESTFulSense.Tests/Services/Orchestrations/Forms/FormOrchestrationServiceTests.cs index 55d10d12..6a248b7b 100644 --- a/RESTFulSense.Tests/Services/Orchestrations/Forms/FormOrchestrationServiceTests.cs +++ b/RESTFulSense.Tests/Services/Orchestrations/Forms/FormOrchestrationServiceTests.cs @@ -117,12 +117,12 @@ public static TheoryData DependencyValidationExceptions() return new TheoryData { - new AttributeValidationException(innerException), - new AttributeDependencyValidationException(innerException), - new ValueValidationException(innerException), - new ValueDependencyValidationException(innerException), - new FormValidationException(innerException), - new FormDependencyValidationException(innerException) + new AttributeValidationException(randomMessage,innerException), + new AttributeDependencyValidationException(randomMessage,innerException), + new ValueValidationException(randomMessage, innerException), + new ValueDependencyValidationException(randomMessage, innerException), + new FormValidationException(randomMessage,innerException), + new FormDependencyValidationException(randomMessage, innerException) }; } @@ -134,12 +134,12 @@ public static TheoryData DependencyExceptions() return new TheoryData { - new AttributeDependencyException(innerException), - new AttributeServiceException(innerException), - new ValueDependencyException(innerException), - new ValueServiceException(innerException), - new FormDependencyException(innerException), - new FormServiceException(innerException) + new AttributeDependencyException(randomMessage, innerException), + new AttributeServiceException(randomMessage,innerException), + new ValueDependencyException(randomMessage, innerException), + new ValueServiceException(randomMessage, innerException), + new FormDependencyException(randomMessage,innerException), + new FormServiceException(randomMessage, innerException) }; } } diff --git a/RESTFulSense.Tests/Services/Orchestrations/Properties/PropertyOrchestrationServiceTests.cs b/RESTFulSense.Tests/Services/Orchestrations/Properties/PropertyOrchestrationServiceTests.cs index c74536c2..44a8e7e4 100644 --- a/RESTFulSense.Tests/Services/Orchestrations/Properties/PropertyOrchestrationServiceTests.cs +++ b/RESTFulSense.Tests/Services/Orchestrations/Properties/PropertyOrchestrationServiceTests.cs @@ -65,10 +65,10 @@ public static TheoryData DependencyValidationExceptions() return new TheoryData { - new TypeValidationException(innerException), - new TypeDependencyValidationException(innerException), - new PropertyValidationException(innerException), - new PropertyDependencyValidationException(innerException), + new TypeValidationException(randomMessage, innerException), + new TypeDependencyValidationException(randomMessage, innerException), + new PropertyValidationException(randomMessage,innerException), + new PropertyDependencyValidationException(randomMessage, innerException), }; } @@ -80,10 +80,10 @@ public static TheoryData DependencyExceptions() return new TheoryData { - new TypeDependencyException(innerException), - new TypeServiceException(innerException), - new PropertyDependencyException(innerException), - new PropertyServiceException(innerException) + new TypeDependencyException(randomMessage, innerException), + new TypeServiceException(randomMessage, innerException), + new PropertyDependencyException(randomMessage, innerException), + new PropertyServiceException(randomMessage, innerException) }; } } diff --git a/RESTFulSense/Clients/RESTFulApiClient.cs b/RESTFulSense/Clients/RESTFulApiClient.cs index a9a5db1e..2de99945 100644 --- a/RESTFulSense/Clients/RESTFulApiClient.cs +++ b/RESTFulSense/Clients/RESTFulApiClient.cs @@ -247,16 +247,19 @@ public async ValueTask PostFormAsync( catch (FormCoordinationValidationException formCoordinationValidationException) { throw new RESTFulApiClientValidationException( + message: "Api Client validation errors occurred, please try again.", formCoordinationValidationException.InnerException as Xeption); } catch (FormCoordinationDependencyException formCoordinationDependencyException) { throw new RESTFulApiClientDependencyException( + message: "Form coordination dependency error occurred, fix the errors and try again.", formCoordinationDependencyException.InnerException as Xeption); } catch (FormCoordinationServiceException formCoordinationServiceException) { throw new RESTFulApiClientServiceException( + message: "Api Client error occurred, contact support.", formCoordinationServiceException.InnerException as Xeption); } } diff --git a/RESTFulSense/Clients/RESTFulApiFactoryClient.cs b/RESTFulSense/Clients/RESTFulApiFactoryClient.cs index 14a315e7..f105f91a 100644 --- a/RESTFulSense/Clients/RESTFulApiFactoryClient.cs +++ b/RESTFulSense/Clients/RESTFulApiFactoryClient.cs @@ -290,16 +290,19 @@ await this.httpClient.PostAsync( catch (FormCoordinationValidationException formCoordinationValidationException) { throw new RESTFulApiClientValidationException( + message: "Api Client validation errors occurred, please try again.", formCoordinationValidationException.InnerException as Xeption); } catch (FormCoordinationDependencyException formCoordinationDependencyException) { throw new RESTFulApiClientDependencyException( + message: "Form coordination dependency error occurred, fix the errors and try again.", formCoordinationDependencyException.InnerException as Xeption); } catch (FormCoordinationServiceException formCoordinationServiceException) { throw new RESTFulApiClientServiceException( + message: "Api Client error occurred, contact support.", formCoordinationServiceException.InnerException as Xeption); } } diff --git a/RESTFulSense/Models/Client/Exceptions/RESTFulApiClientDependencyException.cs b/RESTFulSense/Models/Client/Exceptions/RESTFulApiClientDependencyException.cs index bf1dc64d..566a9bd1 100644 --- a/RESTFulSense/Models/Client/Exceptions/RESTFulApiClientDependencyException.cs +++ b/RESTFulSense/Models/Client/Exceptions/RESTFulApiClientDependencyException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Client.Exceptions { public class RESTFulApiClientDependencyException : Xeption { - public RESTFulApiClientDependencyException(Xeption innerException) - : base( - message: "Form coordination dependency error occurred, fix the errors and try again.", - innerException: innerException) - { } - public RESTFulApiClientDependencyException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Client/Exceptions/RESTFulApiClientServiceException.cs b/RESTFulSense/Models/Client/Exceptions/RESTFulApiClientServiceException.cs index e187d2bf..26fb762a 100644 --- a/RESTFulSense/Models/Client/Exceptions/RESTFulApiClientServiceException.cs +++ b/RESTFulSense/Models/Client/Exceptions/RESTFulApiClientServiceException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Client.Exceptions { public class RESTFulApiClientServiceException : Xeption { - public RESTFulApiClientServiceException(Xeption innerException) - : base( - message: "Api Client error occurred, contact support.", - innerException: innerException) - { } - public RESTFulApiClientServiceException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Client/Exceptions/RESTFulApiClientValidationException.cs b/RESTFulSense/Models/Client/Exceptions/RESTFulApiClientValidationException.cs index 84a77a36..fc580615 100644 --- a/RESTFulSense/Models/Client/Exceptions/RESTFulApiClientValidationException.cs +++ b/RESTFulSense/Models/Client/Exceptions/RESTFulApiClientValidationException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Client.Exceptions { public class RESTFulApiClientValidationException : Xeption { - public RESTFulApiClientValidationException(Xeption innerException) - : base( - message: "Api Client validation errors occurred, please try again.", - innerException: innerException) - { } - public RESTFulApiClientValidationException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Coordinations/Forms/Exceptions/FailedFormCoordinationServiceException.cs b/RESTFulSense/Models/Coordinations/Forms/Exceptions/FailedFormCoordinationServiceException.cs index 9fe448ff..45061ec4 100644 --- a/RESTFulSense/Models/Coordinations/Forms/Exceptions/FailedFormCoordinationServiceException.cs +++ b/RESTFulSense/Models/Coordinations/Forms/Exceptions/FailedFormCoordinationServiceException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Coordinations.Forms.Exceptions { public class FailedFormCoordinationServiceException : Xeption { - public FailedFormCoordinationServiceException(Exception innerException) - : base( - message: "Form coordination service error occurred, contact support.", - innerException: innerException) - { } - public FailedFormCoordinationServiceException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Coordinations/Forms/Exceptions/FormCoordinationDependencyException.cs b/RESTFulSense/Models/Coordinations/Forms/Exceptions/FormCoordinationDependencyException.cs index ac4bd23c..b664244d 100644 --- a/RESTFulSense/Models/Coordinations/Forms/Exceptions/FormCoordinationDependencyException.cs +++ b/RESTFulSense/Models/Coordinations/Forms/Exceptions/FormCoordinationDependencyException.cs @@ -8,14 +8,8 @@ namespace RESTFulSense.Models.Coordinations.Forms.Exceptions { public class FormCoordinationDependencyException : Xeption { - public FormCoordinationDependencyException(Xeption innerException) - : base( - message: "Form coordination dependency error occurred, fix the errors and try again.", - innerException: innerException) - { } - public FormCoordinationDependencyException(string message, Xeption innerException) - : base(message, innerException) + : base(message, innerException) { } } } \ No newline at end of file diff --git a/RESTFulSense/Models/Coordinations/Forms/Exceptions/FormCoordinationDependencyValidationException.cs b/RESTFulSense/Models/Coordinations/Forms/Exceptions/FormCoordinationDependencyValidationException.cs index 78f08ade..17af6418 100644 --- a/RESTFulSense/Models/Coordinations/Forms/Exceptions/FormCoordinationDependencyValidationException.cs +++ b/RESTFulSense/Models/Coordinations/Forms/Exceptions/FormCoordinationDependencyValidationException.cs @@ -8,14 +8,8 @@ namespace RESTFulSense.Models.Coordinations.Forms.Exceptions { public class FormCoordinationDependencyValidationException : Xeption { - public FormCoordinationDependencyValidationException(Xeption innerException) - : base( - message: "Form coordination dependency validation error occurred, fix the errors and try again.", - innerException: innerException) - { } - public FormCoordinationDependencyValidationException(string message, Xeption innerException) - : base(message, innerException) + : base(message, innerException) { } } } \ No newline at end of file diff --git a/RESTFulSense/Models/Coordinations/Forms/Exceptions/FormCoordinationServiceException.cs b/RESTFulSense/Models/Coordinations/Forms/Exceptions/FormCoordinationServiceException.cs index 612e82c8..9851927b 100644 --- a/RESTFulSense/Models/Coordinations/Forms/Exceptions/FormCoordinationServiceException.cs +++ b/RESTFulSense/Models/Coordinations/Forms/Exceptions/FormCoordinationServiceException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Coordinations.Forms.Exceptions { public class FormCoordinationServiceException : Xeption { - public FormCoordinationServiceException(Xeption innerException) - : base( - message: "Form coordination service error occurred, contact support.", - innerException: innerException) - { } - public FormCoordinationServiceException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Coordinations/Forms/Exceptions/FormCoordinationValidationException.cs b/RESTFulSense/Models/Coordinations/Forms/Exceptions/FormCoordinationValidationException.cs index bfd4ee41..f34fb19d 100644 --- a/RESTFulSense/Models/Coordinations/Forms/Exceptions/FormCoordinationValidationException.cs +++ b/RESTFulSense/Models/Coordinations/Forms/Exceptions/FormCoordinationValidationException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Coordinations.Forms.Exceptions { public class FormCoordinationValidationException : Xeption { - public FormCoordinationValidationException(Xeption innerException) - : base( - message: "Form coordination validation errors occurred, please try again.", - innerException: innerException) - { } - public FormCoordinationValidationException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Coordinations/Forms/Exceptions/NullObjectException.cs b/RESTFulSense/Models/Coordinations/Forms/Exceptions/NullObjectException.cs index d1b3782e..6726bb40 100644 --- a/RESTFulSense/Models/Coordinations/Forms/Exceptions/NullObjectException.cs +++ b/RESTFulSense/Models/Coordinations/Forms/Exceptions/NullObjectException.cs @@ -8,10 +8,6 @@ namespace RESTFulSense.Models.Coordinations.Forms.Exceptions { public class NullObjectException : Xeption { - public NullObjectException() - : base(message: "Object is null.") - { } - public NullObjectException(string message) : base(message) { } diff --git a/RESTFulSense/Models/Foundations/Attributes/Exceptions/AttributeDependencyException.cs b/RESTFulSense/Models/Foundations/Attributes/Exceptions/AttributeDependencyException.cs index be829eaf..2360445b 100644 --- a/RESTFulSense/Models/Foundations/Attributes/Exceptions/AttributeDependencyException.cs +++ b/RESTFulSense/Models/Foundations/Attributes/Exceptions/AttributeDependencyException.cs @@ -8,14 +8,8 @@ namespace RESTFulSense.Models.Foundations.Attributes.Exceptions { public class AttributeDependencyException : Xeption { - public AttributeDependencyException(Xeption innerException) : - base( - message: "Attribute dependency error occurred, contact support.", - innerException: innerException) - { } - - public AttributeDependencyException(string message, Xeption innerException) : - base(message, innerException) + public AttributeDependencyException(string message, Xeption innerException) + : base(message, innerException) { } } } \ No newline at end of file diff --git a/RESTFulSense/Models/Foundations/Attributes/Exceptions/AttributeDependencyValidationException.cs b/RESTFulSense/Models/Foundations/Attributes/Exceptions/AttributeDependencyValidationException.cs index 94a62a83..adb602b0 100644 --- a/RESTFulSense/Models/Foundations/Attributes/Exceptions/AttributeDependencyValidationException.cs +++ b/RESTFulSense/Models/Foundations/Attributes/Exceptions/AttributeDependencyValidationException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Foundations.Attributes.Exceptions { public class AttributeDependencyValidationException : Xeption { - public AttributeDependencyValidationException(Exception innerException) - : base( - message: "Attribute dependency validation error occurred, fix errors and try again.", - innerException: innerException) - { } - public AttributeDependencyValidationException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Attributes/Exceptions/AttributeServiceException.cs b/RESTFulSense/Models/Foundations/Attributes/Exceptions/AttributeServiceException.cs index 67dde591..089fb0bd 100644 --- a/RESTFulSense/Models/Foundations/Attributes/Exceptions/AttributeServiceException.cs +++ b/RESTFulSense/Models/Foundations/Attributes/Exceptions/AttributeServiceException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Foundations.Attributes.Exceptions { public class AttributeServiceException : Xeption { - public AttributeServiceException(Xeption innerException) - : base( - message: "Attribute service error occurred, contact support.", - innerException: innerException) - { } - public AttributeServiceException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Attributes/Exceptions/AttributeValidationException.cs b/RESTFulSense/Models/Foundations/Attributes/Exceptions/AttributeValidationException.cs index ea067bf5..84934554 100644 --- a/RESTFulSense/Models/Foundations/Attributes/Exceptions/AttributeValidationException.cs +++ b/RESTFulSense/Models/Foundations/Attributes/Exceptions/AttributeValidationException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Foundations.Attributes.Exceptions { public class AttributeValidationException : Xeption { - public AttributeValidationException(Xeption innerException) - : base( - message: "Attribute validation error occurred, fix errors and try again.", - innerException: innerException) - { } - public AttributeValidationException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Attributes/Exceptions/FailedAttributeServiceException.cs b/RESTFulSense/Models/Foundations/Attributes/Exceptions/FailedAttributeServiceException.cs index 158db80c..82941224 100644 --- a/RESTFulSense/Models/Foundations/Attributes/Exceptions/FailedAttributeServiceException.cs +++ b/RESTFulSense/Models/Foundations/Attributes/Exceptions/FailedAttributeServiceException.cs @@ -9,14 +9,8 @@ namespace RESTFulSense.Models.Foundations.Properties.Exceptions { public class FailedAttributeServiceException : Xeption { - public FailedAttributeServiceException(Exception innerException) - : base( - message: "Failed Attribute Service Exception occurred, please contact support for assistance.", - innerException: innerException) - { } - public FailedAttributeServiceException(string message, Exception innerException) - : base(message, innerException) + : base(message, innerException) { } } } \ No newline at end of file diff --git a/RESTFulSense/Models/Foundations/Attributes/Exceptions/NullPropertyInfoException.cs b/RESTFulSense/Models/Foundations/Attributes/Exceptions/NullPropertyInfoException.cs index 64d30260..22731600 100644 --- a/RESTFulSense/Models/Foundations/Attributes/Exceptions/NullPropertyInfoException.cs +++ b/RESTFulSense/Models/Foundations/Attributes/Exceptions/NullPropertyInfoException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Foundations.Attributes.Exceptions { public class NullPropertyInfoException : Xeption { - public NullPropertyInfoException(Exception innerException) - : base( - message: "PropertyInfo is null, fix errors and try again.", - innerException: innerException) - { } - public NullPropertyInfoException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Forms/Exceptions/FailedFormServiceException.cs b/RESTFulSense/Models/Foundations/Forms/Exceptions/FailedFormServiceException.cs index 0e1be561..0133837b 100644 --- a/RESTFulSense/Models/Foundations/Forms/Exceptions/FailedFormServiceException.cs +++ b/RESTFulSense/Models/Foundations/Forms/Exceptions/FailedFormServiceException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Foundations.Forms.Exceptions { public class FailedFormServiceException : Xeption { - public FailedFormServiceException(Exception innerException) - : base( - message: "Failed Form Service Exception occurred, please contact support for assistance.", - innerException: innerException) - { } - public FailedFormServiceException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Forms/Exceptions/FormDependencyException.cs b/RESTFulSense/Models/Foundations/Forms/Exceptions/FormDependencyException.cs index 97d18d18..20e982b6 100644 --- a/RESTFulSense/Models/Foundations/Forms/Exceptions/FormDependencyException.cs +++ b/RESTFulSense/Models/Foundations/Forms/Exceptions/FormDependencyException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Foundations.Forms.Exceptions { public class FormDependencyException : Xeption { - public FormDependencyException(Xeption innerException) - : base( - message: "Form dependency error occurred, contact support.", - innerException: innerException) - { } - public FormDependencyException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Forms/Exceptions/FormDependencyValidationException.cs b/RESTFulSense/Models/Foundations/Forms/Exceptions/FormDependencyValidationException.cs index a2e01d6a..fa99d9ce 100644 --- a/RESTFulSense/Models/Foundations/Forms/Exceptions/FormDependencyValidationException.cs +++ b/RESTFulSense/Models/Foundations/Forms/Exceptions/FormDependencyValidationException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Foundations.Forms.Exceptions { public class FormDependencyValidationException : Xeption { - public FormDependencyValidationException(Exception innerException) - : base( - message: "Form dependency validation error occurred, fix errors and try again.", - innerException: innerException) - { } - public FormDependencyValidationException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Forms/Exceptions/FormServiceException.cs b/RESTFulSense/Models/Foundations/Forms/Exceptions/FormServiceException.cs index f5cf4755..05771375 100644 --- a/RESTFulSense/Models/Foundations/Forms/Exceptions/FormServiceException.cs +++ b/RESTFulSense/Models/Foundations/Forms/Exceptions/FormServiceException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Foundations.Forms.Exceptions { public class FormServiceException : Xeption { - public FormServiceException(Xeption innerException) - : base( - message: "Form service error occurred, contact support.", - innerException: innerException) - { } - public FormServiceException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Forms/Exceptions/FormValidationException.cs b/RESTFulSense/Models/Foundations/Forms/Exceptions/FormValidationException.cs index 34bfc919..908290f6 100644 --- a/RESTFulSense/Models/Foundations/Forms/Exceptions/FormValidationException.cs +++ b/RESTFulSense/Models/Foundations/Forms/Exceptions/FormValidationException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Foundations.Forms.Exceptions { public class FormValidationException : Xeption { - public FormValidationException(Xeption innerException) - : base( - message: "Form validation error occurred, fix errors and try again.", - innerException: innerException) - { } - public FormValidationException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Forms/Exceptions/InvalidFormArgumentException.cs b/RESTFulSense/Models/Foundations/Forms/Exceptions/InvalidFormArgumentException.cs index aadb5c4f..f8146809 100644 --- a/RESTFulSense/Models/Foundations/Forms/Exceptions/InvalidFormArgumentException.cs +++ b/RESTFulSense/Models/Foundations/Forms/Exceptions/InvalidFormArgumentException.cs @@ -8,10 +8,6 @@ namespace RESTFulSense.Models.Foundations.Forms.Exceptions { public class InvalidFormArgumentException : Xeption { - public InvalidFormArgumentException() - : base(message: "Invalid form arguments. Please fix the errors and try again.") - { } - public InvalidFormArgumentException(string message) : base(message) { } diff --git a/RESTFulSense/Models/Foundations/Properties/Exceptions/FailedPropertyDependencyException.cs b/RESTFulSense/Models/Foundations/Properties/Exceptions/FailedPropertyDependencyException.cs index 6f87fb5f..d10b7b4a 100644 --- a/RESTFulSense/Models/Foundations/Properties/Exceptions/FailedPropertyDependencyException.cs +++ b/RESTFulSense/Models/Foundations/Properties/Exceptions/FailedPropertyDependencyException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Foundations.Properties.Exceptions { public class FailedPropertyDependencyException : Xeption { - public FailedPropertyDependencyException(Exception innerException) - : base( - message: "Property dependency error occurred, contact support.", - innerException: innerException) - { } - public FailedPropertyDependencyException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Properties/Exceptions/FailedPropertyDependencyValidationException.cs b/RESTFulSense/Models/Foundations/Properties/Exceptions/FailedPropertyDependencyValidationException.cs index 2d7cf084..40a93b1a 100644 --- a/RESTFulSense/Models/Foundations/Properties/Exceptions/FailedPropertyDependencyValidationException.cs +++ b/RESTFulSense/Models/Foundations/Properties/Exceptions/FailedPropertyDependencyValidationException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Foundations.Properties.Exceptions { public class FailedPropertyDependencyValidationException : Xeption { - public FailedPropertyDependencyValidationException(Exception innerException) - : base( - message: "Failed property dependency validation error occurred, fix errors and try again.", - innerException: innerException) - { } - public FailedPropertyDependencyValidationException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Properties/Exceptions/FailedPropertyServiceException.cs b/RESTFulSense/Models/Foundations/Properties/Exceptions/FailedPropertyServiceException.cs index 06e09b8c..ed96d12b 100644 --- a/RESTFulSense/Models/Foundations/Properties/Exceptions/FailedPropertyServiceException.cs +++ b/RESTFulSense/Models/Foundations/Properties/Exceptions/FailedPropertyServiceException.cs @@ -9,14 +9,8 @@ namespace RESTFulSense.Models.Foundations.Properties.Exceptions { public class FailedPropertyServiceException : Xeption { - public FailedPropertyServiceException(Exception innerException) - : base( - message: "Failed Property Service Exception occurred, please contact support for assistance.", - innerException: innerException) - { } - public FailedPropertyServiceException(string message, Exception innerException) - : base(message, innerException) + : base(message, innerException) { } } } \ No newline at end of file diff --git a/RESTFulSense/Models/Foundations/Properties/Exceptions/NullTypeException.cs b/RESTFulSense/Models/Foundations/Properties/Exceptions/NullTypeException.cs index aba40cde..542013ce 100644 --- a/RESTFulSense/Models/Foundations/Properties/Exceptions/NullTypeException.cs +++ b/RESTFulSense/Models/Foundations/Properties/Exceptions/NullTypeException.cs @@ -8,10 +8,6 @@ namespace RESTFulSense.Models.Foundations.Properties.Exceptions { public class NullTypeException : Xeption { - public NullTypeException() - : base(message: "Type is null.") - { } - public NullTypeException(string message) : base(message) { } diff --git a/RESTFulSense/Models/Foundations/Properties/Exceptions/PropertyDependencyException.cs b/RESTFulSense/Models/Foundations/Properties/Exceptions/PropertyDependencyException.cs index 82f2c590..d26c10dd 100644 --- a/RESTFulSense/Models/Foundations/Properties/Exceptions/PropertyDependencyException.cs +++ b/RESTFulSense/Models/Foundations/Properties/Exceptions/PropertyDependencyException.cs @@ -8,14 +8,8 @@ namespace RESTFulSense.Models.Foundations.Properties.Exceptions { public class PropertyDependencyException : Xeption { - public PropertyDependencyException(Xeption innerException) : - base( - message: "Property dependency error occurred, contact support.", - innerException: innerException) - { } - - public PropertyDependencyException(string message, Xeption innerException) : - base(message, innerException) + public PropertyDependencyException(string message, Xeption innerException) + : base(message, innerException) { } } } \ No newline at end of file diff --git a/RESTFulSense/Models/Foundations/Properties/Exceptions/PropertyDependencyValidationException.cs b/RESTFulSense/Models/Foundations/Properties/Exceptions/PropertyDependencyValidationException.cs index 2212ff07..6d3b2438 100644 --- a/RESTFulSense/Models/Foundations/Properties/Exceptions/PropertyDependencyValidationException.cs +++ b/RESTFulSense/Models/Foundations/Properties/Exceptions/PropertyDependencyValidationException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Foundations.Properties.Exceptions { public class PropertyDependencyValidationException : Xeption { - public PropertyDependencyValidationException(Xeption innerException) - : base( - message: "Property dependency validation occurred, fix errors and try again.", - innerException: innerException) - { } - public PropertyDependencyValidationException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Properties/Exceptions/PropertyServiceException.cs b/RESTFulSense/Models/Foundations/Properties/Exceptions/PropertyServiceException.cs index 7200fcdf..36b41143 100644 --- a/RESTFulSense/Models/Foundations/Properties/Exceptions/PropertyServiceException.cs +++ b/RESTFulSense/Models/Foundations/Properties/Exceptions/PropertyServiceException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Foundations.Properties.Exceptions { public class PropertyServiceException : Xeption { - public PropertyServiceException(Xeption innerException) - : base( - message: "Property service error occurred, contact support.", - innerException: innerException) - { } - public PropertyServiceException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Properties/Exceptions/PropertyValidationException.cs b/RESTFulSense/Models/Foundations/Properties/Exceptions/PropertyValidationException.cs index 950458aa..20c3f7f9 100644 --- a/RESTFulSense/Models/Foundations/Properties/Exceptions/PropertyValidationException.cs +++ b/RESTFulSense/Models/Foundations/Properties/Exceptions/PropertyValidationException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Foundations.Properties.Exceptions { public class PropertyValidationException : Xeption { - public PropertyValidationException(Xeption innerException) - : base( - message: "Property validation errors occurred, fix errors and try again.", - innerException: innerException) - { } - public PropertyValidationException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Types/Exceptions/FailedTypeDependencyException.cs b/RESTFulSense/Models/Foundations/Types/Exceptions/FailedTypeDependencyException.cs index f05d5297..d08226db 100644 --- a/RESTFulSense/Models/Foundations/Types/Exceptions/FailedTypeDependencyException.cs +++ b/RESTFulSense/Models/Foundations/Types/Exceptions/FailedTypeDependencyException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Foundations.Types.Exceptions { internal class FailedTypeDependencyException : Xeption { - public FailedTypeDependencyException(Exception innerException) - : base( - message: "Type dependency error occurred, contact support.", - innerException: innerException) - { } - public FailedTypeDependencyException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Types/Exceptions/FailedTypeDependencyValidationException.cs b/RESTFulSense/Models/Foundations/Types/Exceptions/FailedTypeDependencyValidationException.cs index 10889864..b7c4c770 100644 --- a/RESTFulSense/Models/Foundations/Types/Exceptions/FailedTypeDependencyValidationException.cs +++ b/RESTFulSense/Models/Foundations/Types/Exceptions/FailedTypeDependencyValidationException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Foundations.Types.Exceptions { public class FailedTypeDependencyValidationException : Xeption { - public FailedTypeDependencyValidationException(Exception innerException) - : base( - message: "Failed type dependency validation error occurred, fix errors and try again.", - innerException: innerException) - { } - public FailedTypeDependencyValidationException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Types/Exceptions/FailedTypeServiceException.cs b/RESTFulSense/Models/Foundations/Types/Exceptions/FailedTypeServiceException.cs index 09eeb97a..44627659 100644 --- a/RESTFulSense/Models/Foundations/Types/Exceptions/FailedTypeServiceException.cs +++ b/RESTFulSense/Models/Foundations/Types/Exceptions/FailedTypeServiceException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Foundations.Types.Exceptions { public class FailedTypeServiceException : Xeption { - public FailedTypeServiceException(Exception innerException) - : base( - message: "Failed Type Service Exception occurred, please contact support for assistance.", - innerException: innerException) - { } - public FailedTypeServiceException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Types/Exceptions/NullObjectException.cs b/RESTFulSense/Models/Foundations/Types/Exceptions/NullObjectException.cs index de86d91f..140b9495 100644 --- a/RESTFulSense/Models/Foundations/Types/Exceptions/NullObjectException.cs +++ b/RESTFulSense/Models/Foundations/Types/Exceptions/NullObjectException.cs @@ -8,10 +8,6 @@ namespace RESTFulSense.Models.Foundations.Types.Exceptions { public class NullObjectException : Xeption { - public NullObjectException() - : base(message: "Object is null.") - { } - public NullObjectException(string message) : base(message) { } diff --git a/RESTFulSense/Models/Foundations/Types/Exceptions/TypeDependencyException.cs b/RESTFulSense/Models/Foundations/Types/Exceptions/TypeDependencyException.cs index 485a10c5..caac7909 100644 --- a/RESTFulSense/Models/Foundations/Types/Exceptions/TypeDependencyException.cs +++ b/RESTFulSense/Models/Foundations/Types/Exceptions/TypeDependencyException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Foundations.Types.Exceptions { internal class TypeDependencyException : Xeption { - public TypeDependencyException(Xeption innerException) - : base( - message: "Type dependency error occurred, contact support.", - innerException: innerException) - { } - public TypeDependencyException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Types/Exceptions/TypeDependencyValidationException.cs b/RESTFulSense/Models/Foundations/Types/Exceptions/TypeDependencyValidationException.cs index f1b955bf..c0f0468e 100644 --- a/RESTFulSense/Models/Foundations/Types/Exceptions/TypeDependencyValidationException.cs +++ b/RESTFulSense/Models/Foundations/Types/Exceptions/TypeDependencyValidationException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Foundations.Types.Exceptions { internal class TypeDependencyValidationException : Xeption { - public TypeDependencyValidationException(Xeption innerException) - : base( - message: "Type dependency validation occurred, fix errors and try again.", - innerException: innerException) - { } - public TypeDependencyValidationException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Types/Exceptions/TypeServiceException.cs b/RESTFulSense/Models/Foundations/Types/Exceptions/TypeServiceException.cs index f76b1937..c82399d2 100644 --- a/RESTFulSense/Models/Foundations/Types/Exceptions/TypeServiceException.cs +++ b/RESTFulSense/Models/Foundations/Types/Exceptions/TypeServiceException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Foundations.Types.Exceptions { public class TypeServiceException : Xeption { - public TypeServiceException(Xeption innerException) - : base( - message: "Type service error occurred, contact support.", - innerException: innerException) - { } - public TypeServiceException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Types/Exceptions/TypeValidationException.cs b/RESTFulSense/Models/Foundations/Types/Exceptions/TypeValidationException.cs index f78c3a56..2afa54df 100644 --- a/RESTFulSense/Models/Foundations/Types/Exceptions/TypeValidationException.cs +++ b/RESTFulSense/Models/Foundations/Types/Exceptions/TypeValidationException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Foundations.Types.Exceptions { internal class TypeValidationException : Xeption { - public TypeValidationException(Xeption innerException) - : base( - message: "Type validation errors occurred, fix errors and try again.", - innerException) - { } - public TypeValidationException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Values/Exceptions/FailedValueServiceException.cs b/RESTFulSense/Models/Foundations/Values/Exceptions/FailedValueServiceException.cs index b5310c3f..5771c66c 100644 --- a/RESTFulSense/Models/Foundations/Values/Exceptions/FailedValueServiceException.cs +++ b/RESTFulSense/Models/Foundations/Values/Exceptions/FailedValueServiceException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Foundations.Values.Exceptions { public class FailedValueServiceException : Xeption { - public FailedValueServiceException(Exception innerException) - : base( - message: "Failed Value Service Exception occurred, please contact support for assistance.", - innerException: innerException) - { } - public FailedValueServiceException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Values/Exceptions/ValueDependencyException.cs b/RESTFulSense/Models/Foundations/Values/Exceptions/ValueDependencyException.cs index 22ef21d8..fc7e9b54 100644 --- a/RESTFulSense/Models/Foundations/Values/Exceptions/ValueDependencyException.cs +++ b/RESTFulSense/Models/Foundations/Values/Exceptions/ValueDependencyException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Foundations.Values.Exceptions { public class ValueDependencyException : Xeption { - public ValueDependencyException(Xeption innerException) - : base( - message: "Value dependency error occurred, contact support.", - innerException: innerException) - { } - public ValueDependencyException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Values/Exceptions/ValueDependencyValidationException.cs b/RESTFulSense/Models/Foundations/Values/Exceptions/ValueDependencyValidationException.cs index 61379114..233a55bc 100644 --- a/RESTFulSense/Models/Foundations/Values/Exceptions/ValueDependencyValidationException.cs +++ b/RESTFulSense/Models/Foundations/Values/Exceptions/ValueDependencyValidationException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Foundations.Values.Exceptions { public class ValueDependencyValidationException : Xeption { - public ValueDependencyValidationException(Xeption innerException) - : base( - message: "Value dependency validation occurred, fix errors and try again.", - innerException: innerException) - { } - public ValueDependencyValidationException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Values/Exceptions/ValueServiceException.cs b/RESTFulSense/Models/Foundations/Values/Exceptions/ValueServiceException.cs index 3e3450ba..76665b1e 100644 --- a/RESTFulSense/Models/Foundations/Values/Exceptions/ValueServiceException.cs +++ b/RESTFulSense/Models/Foundations/Values/Exceptions/ValueServiceException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Foundations.Values.Exceptions { public class ValueServiceException : Xeption { - public ValueServiceException(Xeption innerException) - : base( - message: "Value service error occurred, contact support.", - innerException: innerException) - { } - public ValueServiceException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Foundations/Values/Exceptions/ValueValidationException.cs b/RESTFulSense/Models/Foundations/Values/Exceptions/ValueValidationException.cs index 7f03bd9a..1b8318ab 100644 --- a/RESTFulSense/Models/Foundations/Values/Exceptions/ValueValidationException.cs +++ b/RESTFulSense/Models/Foundations/Values/Exceptions/ValueValidationException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Foundations.Values.Exceptions { public class ValueValidationException : Xeption { - public ValueValidationException(Xeption innerException) - : base( - message: "Value validation errors occurred, fix errors and try again.", - innerException: innerException) - { } - public ValueValidationException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FailedFormOrchestrationServiceException.cs b/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FailedFormOrchestrationServiceException.cs index f3465b94..0a393aa6 100644 --- a/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FailedFormOrchestrationServiceException.cs +++ b/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FailedFormOrchestrationServiceException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Orchestrations.Forms.Exceptions { internal class FailedFormOrchestrationServiceException : Xeption { - public FailedFormOrchestrationServiceException(Exception innerException) - : base( - message: "Failed form orchestration service occurred, please contact support", - innerException: innerException) - { } - public FailedFormOrchestrationServiceException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FormOrchestrationDependencyException.cs b/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FormOrchestrationDependencyException.cs index e09e0da9..a16c1ed8 100644 --- a/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FormOrchestrationDependencyException.cs +++ b/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FormOrchestrationDependencyException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Orchestrations.Forms.Exceptions { internal class FormOrchestrationDependencyException : Xeption { - public FormOrchestrationDependencyException(Exception innerException) - : base( - message: "Form orchestration dependency error occurred, fix errors and try again.", - innerException: innerException) - { } - public FormOrchestrationDependencyException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FormOrchestrationDependencyValidationException.cs b/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FormOrchestrationDependencyValidationException.cs index d653ab00..71afaae4 100644 --- a/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FormOrchestrationDependencyValidationException.cs +++ b/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FormOrchestrationDependencyValidationException.cs @@ -8,14 +8,8 @@ namespace RESTFulSense.Models.Orchestrations.Forms.Exceptions { internal class FormOrchestrationDependencyValidationException : Xeption { - public FormOrchestrationDependencyValidationException(Xeption innerException) - : base( - message: "Form orchestration dependency validation error occurred, fix the errors and try again.", - innerException: innerException) - { } - public FormOrchestrationDependencyValidationException(string message, Xeption innerException) - : base(message, innerException) + : base(message, innerException) { } } } \ No newline at end of file diff --git a/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FormOrchestrationServiceException.cs b/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FormOrchestrationServiceException.cs index d4a7a89d..ad6af40d 100644 --- a/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FormOrchestrationServiceException.cs +++ b/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FormOrchestrationServiceException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Orchestrations.Forms.Exceptions { internal class FormOrchestrationServiceException : Xeption { - public FormOrchestrationServiceException(Xeption innerException) - : base( - message: "Form orchestration service error occurred, contact support.", - innerException: innerException) - { } - public FormOrchestrationServiceException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FormOrchestrationValidationException.cs b/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FormOrchestrationValidationException.cs index 106ec364..f5cbe4e1 100644 --- a/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FormOrchestrationValidationException.cs +++ b/RESTFulSense/Models/Orchestrations/Forms/Exceptions/FormOrchestrationValidationException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Orchestrations.Forms.Exceptions { internal class FormOrchestrationValidationException : Xeption { - public FormOrchestrationValidationException(Xeption innerException) - : base( - message: "Form orchestration validation errors occurred, please try again.", - innerException: innerException) - { } - public FormOrchestrationValidationException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Orchestrations/Forms/Exceptions/NullFormModelException.cs b/RESTFulSense/Models/Orchestrations/Forms/Exceptions/NullFormModelException.cs index 21411993..ec623f2d 100644 --- a/RESTFulSense/Models/Orchestrations/Forms/Exceptions/NullFormModelException.cs +++ b/RESTFulSense/Models/Orchestrations/Forms/Exceptions/NullFormModelException.cs @@ -8,11 +8,6 @@ namespace RESTFulSense.Models.Orchestrations.Forms.Exceptions { internal class NullFormModelException : Xeption { - public NullFormModelException() - : base( - message: "Form model is null. Please correct the errors and try again.") - { } - public NullFormModelException(string message) : base(message) { } diff --git a/RESTFulSense/Models/Orchestrations/Properties/Exceptions/FailedPropertyOrchestrationException.cs b/RESTFulSense/Models/Orchestrations/Properties/Exceptions/FailedPropertyOrchestrationException.cs index da69539d..89258d8e 100644 --- a/RESTFulSense/Models/Orchestrations/Properties/Exceptions/FailedPropertyOrchestrationException.cs +++ b/RESTFulSense/Models/Orchestrations/Properties/Exceptions/FailedPropertyOrchestrationException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Orchestrations.Properties.Exceptions { public class FailedPropertyOrchestrationException : Xeption { - public FailedPropertyOrchestrationException(Exception innerException) - : base( - message: "Failed property orchestration service exception occurred, please contact support.", - innerException: innerException) - { } - public FailedPropertyOrchestrationException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Orchestrations/Properties/Exceptions/NullObjectException.cs b/RESTFulSense/Models/Orchestrations/Properties/Exceptions/NullObjectException.cs index 5585b407..20ed7409 100644 --- a/RESTFulSense/Models/Orchestrations/Properties/Exceptions/NullObjectException.cs +++ b/RESTFulSense/Models/Orchestrations/Properties/Exceptions/NullObjectException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Orchestrations.Properties.Exceptions { public class NullObjectException : Xeption { - public NullObjectException(Exception innerException) - : base( - message: "Object is null, fix errors and try again.", - innerException: innerException) - { } - public NullObjectException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Orchestrations/Properties/Exceptions/NullPropertyModelException.cs b/RESTFulSense/Models/Orchestrations/Properties/Exceptions/NullPropertyModelException.cs index 7289b7ac..28a95893 100644 --- a/RESTFulSense/Models/Orchestrations/Properties/Exceptions/NullPropertyModelException.cs +++ b/RESTFulSense/Models/Orchestrations/Properties/Exceptions/NullPropertyModelException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Orchestrations.Properties.Exceptions { public class NullPropertyModelException : Xeption { - public NullPropertyModelException(Exception innerException) - : base( - message: "PropertyModel is null, fix errors and try again.", - innerException: innerException) - { } - public NullPropertyModelException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Orchestrations/Properties/Exceptions/PropertyOrchestrationDependencyException.cs b/RESTFulSense/Models/Orchestrations/Properties/Exceptions/PropertyOrchestrationDependencyException.cs index 05ad79fb..52cc9085 100644 --- a/RESTFulSense/Models/Orchestrations/Properties/Exceptions/PropertyOrchestrationDependencyException.cs +++ b/RESTFulSense/Models/Orchestrations/Properties/Exceptions/PropertyOrchestrationDependencyException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Orchestrations.Properties.Exceptions { internal class PropertyOrchestrationDependencyException : Xeption { - public PropertyOrchestrationDependencyException(Exception innerException) - : base( - message: "Property orchestration dependency error occurred, fix errors and try again.", - innerException: innerException) - { } - public PropertyOrchestrationDependencyException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Orchestrations/Properties/Exceptions/PropertyOrchestrationDependencyValidationException.cs b/RESTFulSense/Models/Orchestrations/Properties/Exceptions/PropertyOrchestrationDependencyValidationException.cs index 10640d90..a02ae3b2 100644 --- a/RESTFulSense/Models/Orchestrations/Properties/Exceptions/PropertyOrchestrationDependencyValidationException.cs +++ b/RESTFulSense/Models/Orchestrations/Properties/Exceptions/PropertyOrchestrationDependencyValidationException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Orchestrations.Properties.Exceptions { internal class PropertyOrchestrationDependencyValidationException : Xeption { - public PropertyOrchestrationDependencyValidationException(Exception innerException) - : base( - message: "Property orchestration dependency validation error occurred, fix errors and try again.", - innerException: innerException) - { } - public PropertyOrchestrationDependencyValidationException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Orchestrations/Properties/Exceptions/PropertyOrchestrationServiceException.cs b/RESTFulSense/Models/Orchestrations/Properties/Exceptions/PropertyOrchestrationServiceException.cs index 4421dd43..53ec7be7 100644 --- a/RESTFulSense/Models/Orchestrations/Properties/Exceptions/PropertyOrchestrationServiceException.cs +++ b/RESTFulSense/Models/Orchestrations/Properties/Exceptions/PropertyOrchestrationServiceException.cs @@ -8,12 +8,6 @@ namespace RESTFulSense.Models.Orchestrations.Properties.Exceptions { public class PropertyOrchestrationServiceException : Xeption { - public PropertyOrchestrationServiceException(Xeption innerException) - : base( - message: "Property orchestration service error occurred, contact support.", - innerException: innerException) - { } - public PropertyOrchestrationServiceException(string message, Xeption innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Models/Orchestrations/Properties/Exceptions/PropertyOrchestrationValidationException.cs b/RESTFulSense/Models/Orchestrations/Properties/Exceptions/PropertyOrchestrationValidationException.cs index 0b76726e..03209240 100644 --- a/RESTFulSense/Models/Orchestrations/Properties/Exceptions/PropertyOrchestrationValidationException.cs +++ b/RESTFulSense/Models/Orchestrations/Properties/Exceptions/PropertyOrchestrationValidationException.cs @@ -9,12 +9,6 @@ namespace RESTFulSense.Models.Orchestrations.Properties.Exceptions { internal class PropertyOrchestrationValidationException : Xeption { - public PropertyOrchestrationValidationException(Exception innerException) - : base( - message: "Property validation error occurred, fix errors and try again.", - innerException: innerException) - { } - public PropertyOrchestrationValidationException(string message, Exception innerException) : base(message, innerException) { } diff --git a/RESTFulSense/Services/Coordinations/Forms/FormCoordinationService.Exceptions.cs b/RESTFulSense/Services/Coordinations/Forms/FormCoordinationService.Exceptions.cs index a25c649f..bead54ff 100644 --- a/RESTFulSense/Services/Coordinations/Forms/FormCoordinationService.Exceptions.cs +++ b/RESTFulSense/Services/Coordinations/Forms/FormCoordinationService.Exceptions.cs @@ -23,74 +23,83 @@ private MultipartFormDataContent TryCatch(ReturningMultipartFormDataContentFunct } catch (Models.Coordinations.Forms.Exceptions.NullObjectException nullObjectException) { + string message = "Form coordination validation errors occurred, please try again."; var formCoordinationValidationException = - new FormCoordinationValidationException(nullObjectException); + new FormCoordinationValidationException(message, nullObjectException); throw formCoordinationValidationException; } catch (FormOrchestrationValidationException formOrchestrationValidationException) { + string message = "Form coordination dependency validation error occurred, fix the errors and try again."; var formCoordinationDependencyValidationException = - new FormCoordinationDependencyValidationException(formOrchestrationValidationException); + new FormCoordinationDependencyValidationException(message, formOrchestrationValidationException); throw formCoordinationDependencyValidationException; } catch (FormOrchestrationDependencyValidationException formOrchestrationDependencyValidationException) { + string message = "Form coordination dependency validation error occurred, fix the errors and try again."; var formCoordinationDependencyValidationException = - new FormCoordinationDependencyValidationException(formOrchestrationDependencyValidationException); + new FormCoordinationDependencyValidationException(message, formOrchestrationDependencyValidationException); throw formCoordinationDependencyValidationException; } catch (PropertyOrchestrationValidationException propertyOrchestrationValidationException) { + string message = "Form coordination dependency validation error occurred, fix the errors and try again."; var formCoordinationDependencyValidationException = - new FormCoordinationDependencyValidationException(propertyOrchestrationValidationException); + new FormCoordinationDependencyValidationException(message, propertyOrchestrationValidationException); throw formCoordinationDependencyValidationException; } catch (PropertyOrchestrationDependencyValidationException propertyOrchestrationDependencyValidationException) { + string message = "Form coordination dependency validation error occurred, fix the errors and try again."; var formCoordinationDependencyValidationException = - new FormCoordinationDependencyValidationException(propertyOrchestrationDependencyValidationException); + new FormCoordinationDependencyValidationException(message, propertyOrchestrationDependencyValidationException); throw formCoordinationDependencyValidationException; } catch (FormOrchestrationDependencyException formOrchestrationDependencyException) { + string message = "Form coordination dependency error occurred, fix the errors and try again."; ; var formCoordinationDependencyException = - new FormCoordinationDependencyException(formOrchestrationDependencyException); + new FormCoordinationDependencyException(message,formOrchestrationDependencyException); throw formCoordinationDependencyException; } catch (FormOrchestrationServiceException formOrchestrationServiceException) { + string message = "Form coordination dependency error occurred, fix the errors and try again."; ; var formCoordinationDependencyException = - new FormCoordinationDependencyException(formOrchestrationServiceException); + new FormCoordinationDependencyException(message, formOrchestrationServiceException); throw formCoordinationDependencyException; } catch (PropertyOrchestrationDependencyException propertyOrchestrationDependencyException) { + string message = "Form coordination dependency error occurred, fix the errors and try again."; var formCoordinationDependencyException = - new FormCoordinationDependencyException(propertyOrchestrationDependencyException); + new FormCoordinationDependencyException(message, propertyOrchestrationDependencyException); throw formCoordinationDependencyException; } catch (PropertyOrchestrationServiceException propertyOrchestrationServiceException) { + string message = "Form coordination dependency error occurred, fix the errors and try again."; var formCoordinationDependencyException = - new FormCoordinationDependencyException(propertyOrchestrationServiceException); + new FormCoordinationDependencyException(message, propertyOrchestrationServiceException); throw formCoordinationDependencyException; } catch (Exception exception) { + string errorMessage = "Form coordination service error occurred, contact support."; var failedFormCoordinationServiceException = - new FailedFormCoordinationServiceException(exception); - + new FailedFormCoordinationServiceException(errorMessage,exception); var formCoordinationServiceException = - new FormCoordinationServiceException(failedFormCoordinationServiceException); + new FormCoordinationServiceException(errorMessage, failedFormCoordinationServiceException); throw formCoordinationServiceException; } diff --git a/RESTFulSense/Services/Coordinations/Forms/FormCoordinationService.Validations.cs b/RESTFulSense/Services/Coordinations/Forms/FormCoordinationService.Validations.cs index 96129eda..2c3780be 100644 --- a/RESTFulSense/Services/Coordinations/Forms/FormCoordinationService.Validations.cs +++ b/RESTFulSense/Services/Coordinations/Forms/FormCoordinationService.Validations.cs @@ -12,7 +12,8 @@ private void ValidateOnConvertToMultipartFormDataContent(T @object) where T : { if (@object == null) { - throw new NullObjectException(); + var errorMessage = "Object is null."; + throw new NullObjectException(errorMessage); } } } diff --git a/RESTFulSense/Services/Foundations/Attributes/AttributeService.Exceptions.cs b/RESTFulSense/Services/Foundations/Attributes/AttributeService.Exceptions.cs index 8fd7c55b..7971be48 100644 --- a/RESTFulSense/Services/Foundations/Attributes/AttributeService.Exceptions.cs +++ b/RESTFulSense/Services/Foundations/Attributes/AttributeService.Exceptions.cs @@ -24,50 +24,70 @@ private TAttribute TryCatch(ReturningAttributeFunction r catch (ArgumentNullException argumentNullException) { var nullPropertyInfoException = - new NullPropertyInfoException(argumentNullException); + new NullPropertyInfoException( + message: "PropertyInfo is null, fix errors and try again.", + innerException:argumentNullException); var attributeValidationException = - new AttributeValidationException(nullPropertyInfoException); + new AttributeValidationException( + message: "Attribute validation error occurred, fix errors and try again.", + innerException: nullPropertyInfoException); throw attributeValidationException; } catch (NotSupportedException notSupportedException) { var failedAttributeServiceException = - new FailedAttributeServiceException(notSupportedException); + new FailedAttributeServiceException( + message: "Failed Attribute Service Exception occurred, please contact support for assistance.", + innerException:notSupportedException); var attributeDependencyValidationException = - new AttributeDependencyValidationException(failedAttributeServiceException); + new AttributeDependencyValidationException( + message: "Attribute dependency validation error occurred, fix errors and try again.", + innerException:failedAttributeServiceException); throw attributeDependencyValidationException; } catch (AmbiguousMatchException ambiguousMatchException) { var failedAttributeServiceException = - new FailedAttributeServiceException(ambiguousMatchException); + new FailedAttributeServiceException( + message: "Failed Attribute Service Exception occurred, please contact support for assistance.", + innerException: ambiguousMatchException); var attributeDependencyValidationException = - new AttributeDependencyValidationException(failedAttributeServiceException); + new AttributeDependencyValidationException( + message: "Attribute dependency validation error occurred, fix errors and try again.", + innerException: failedAttributeServiceException); throw attributeDependencyValidationException; } catch (TypeLoadException typeLoadException) { var failedAttributeServiceException = - new FailedAttributeServiceException(typeLoadException); + new FailedAttributeServiceException( + message: "Failed Attribute Service Exception occurred, please contact support for assistance.", + innerException: typeLoadException); var attributeDependencyValidationException = - new AttributeDependencyValidationException(failedAttributeServiceException); + new AttributeDependencyValidationException( + message: "Attribute dependency validation error occurred, fix errors and try again.", + innerException: failedAttributeServiceException); throw attributeDependencyValidationException; } catch (Exception exception) { var failedAttributeServiceException = - new FailedAttributeServiceException(exception); + new FailedAttributeServiceException( + message: "Failed Attribute Service Exception occurred, please contact support for assistance.", + innerException: exception); var attributeServiceException = - new AttributeServiceException(failedAttributeServiceException); + new AttributeServiceException( + message: "Attribute service error occurred, contact support.", + innerException: failedAttributeServiceException); throw attributeServiceException; } diff --git a/RESTFulSense/Services/Foundations/Forms/FormService.Exceptions.cs b/RESTFulSense/Services/Foundations/Forms/FormService.Exceptions.cs index 2e39f47e..3ed6590c 100644 --- a/RESTFulSense/Services/Foundations/Forms/FormService.Exceptions.cs +++ b/RESTFulSense/Services/Foundations/Forms/FormService.Exceptions.cs @@ -5,6 +5,7 @@ using System; using System.Net.Http; using RESTFulSense.Models.Foundations.Forms.Exceptions; +using Xeptions; namespace RESTFulSense.Services.Foundations.Forms { @@ -22,44 +23,62 @@ private MultipartFormDataContent TryCatch( catch (InvalidFormArgumentException invalidFormArgumentException) { var formValidationException = - new FormValidationException(invalidFormArgumentException); + new FormValidationException( + message: "Form validation error occurred, fix errors and try again.", + innerException: invalidFormArgumentException); throw formValidationException; } catch (ArgumentOutOfRangeException argumentOutOfRangeException) { var formDependencyValidationException = - new FormDependencyValidationException(argumentOutOfRangeException); + new FormDependencyValidationException( + message: "Form dependency validation error occurred, fix errors and try again.", + innerException: argumentOutOfRangeException); var formValidationException = - new FormValidationException(formDependencyValidationException); + new FormValidationException( + message: "Form validation error occurred, fix errors and try again.", + innerException: formDependencyValidationException); throw formValidationException; } catch (ArgumentNullException argumentNullException) { var formDependencyValidationException = - new FormDependencyValidationException(argumentNullException); + new FormDependencyValidationException( + message: "Form dependency validation error occurred, fix errors and try again.", + innerException: argumentNullException); var formValidationException = - new FormValidationException(formDependencyValidationException); + new FormValidationException( + message: "Form validation error occurred, fix errors and try again.", + innerException: formDependencyValidationException); throw formValidationException; } catch (ArgumentException argumentException) { var formDependencyValidationException = - new FormDependencyValidationException(argumentException); + new FormDependencyValidationException( + message: "Form dependency validation error occurred, fix errors and try again.", + innerException: argumentException); var formValidationException = - new FormValidationException(formDependencyValidationException); + new FormValidationException( + message: "Form validation error occurred, fix errors and try again.", + innerException: formDependencyValidationException); throw formValidationException; } catch (Exception exception) { - var failedFormServiceException = new FailedFormServiceException(exception); - var formServiceException = new FormServiceException(failedFormServiceException); + var formServiceException = new FormServiceException( + message: "Form service error occurred, contact support.", + + new FailedFormServiceException( + message: "Failed Form Service Exception occurred, please contact support for assistance.", + innerException :exception)); throw formServiceException; } diff --git a/RESTFulSense/Services/Foundations/Forms/FormService.Validations.cs b/RESTFulSense/Services/Foundations/Forms/FormService.Validations.cs index f59a532f..f6e0f075 100644 --- a/RESTFulSense/Services/Foundations/Forms/FormService.Validations.cs +++ b/RESTFulSense/Services/Foundations/Forms/FormService.Validations.cs @@ -85,7 +85,8 @@ private static void ValidateOnAddStringContent(MultipartFormDataContent multipar private static void Validate(params (dynamic Rule, string Parameter)[] validations) { - var invalidFormArgumentException = new InvalidFormArgumentException(); + var invalidFormArgumentException = new InvalidFormArgumentException( + message: "Invalid form arguments. Please fix the errors and try again."); foreach ((dynamic rule, string parameter) in validations) { diff --git a/RESTFulSense/Services/Foundations/Properties/PropertyService.Exceptions.cs b/RESTFulSense/Services/Foundations/Properties/PropertyService.Exceptions.cs index 93598dc9..a10560da 100644 --- a/RESTFulSense/Services/Foundations/Properties/PropertyService.Exceptions.cs +++ b/RESTFulSense/Services/Foundations/Properties/PropertyService.Exceptions.cs @@ -21,7 +21,9 @@ private PropertyInfo[] TryCatch(ReturningPropertiesFunction returningPropertiesF } catch (NullTypeException nullTypeException) { - var propertyValidationException = new PropertyValidationException(nullTypeException); + var propertyValidationException = new PropertyValidationException( + message: "Property validation errors occurred, fix errors and try again.", + innerException: nullTypeException); throw propertyValidationException; } catch (ArgumentNullException argumentNullException) @@ -62,10 +64,14 @@ private static PropertyDependencyValidationException CreateDependencyValidationE Exception exception) { var failedPropertyDependencyValidationException = - new FailedPropertyDependencyValidationException(exception); + new FailedPropertyDependencyValidationException( + message: "Failed property dependency validation error occurred, fix errors and try again.", + innerException: exception); var propertyDependencyValidationException = - new PropertyDependencyValidationException(failedPropertyDependencyValidationException); + new PropertyDependencyValidationException( + message: "Property dependency validation occurred, fix errors and try again.", + innerException: failedPropertyDependencyValidationException); return propertyDependencyValidationException; } @@ -74,10 +80,14 @@ private static PropertyDependencyException CreateDependencyException( Exception exception) { var failedPropertyDependencyException = - new FailedPropertyDependencyException(exception); + new FailedPropertyDependencyException( + message: "Property dependency error occurred, contact support.", + innerException: exception); var propertyDependencyException = - new PropertyDependencyException(failedPropertyDependencyException); + new PropertyDependencyException( + message: "Property dependency error occurred, contact support.", + innerException: failedPropertyDependencyException); return propertyDependencyException; } @@ -85,10 +95,14 @@ private static PropertyDependencyException CreateDependencyException( private static PropertyServiceException CreateServiceException(Exception exception) { var failedPropertyServiceException = - new FailedPropertyServiceException(exception); + new FailedPropertyServiceException( + message: "Failed Property Service Exception occurred, please contact support for assistance.", + innerException: exception); var propertyServiceException = - new PropertyServiceException(failedPropertyServiceException); + new PropertyServiceException( + message: "Property service error occurred, contact support.", + innerException: failedPropertyServiceException); return propertyServiceException; } } diff --git a/RESTFulSense/Services/Foundations/Properties/PropertyService.Validations.cs b/RESTFulSense/Services/Foundations/Properties/PropertyService.Validations.cs index a17703d4..02fcb9d3 100644 --- a/RESTFulSense/Services/Foundations/Properties/PropertyService.Validations.cs +++ b/RESTFulSense/Services/Foundations/Properties/PropertyService.Validations.cs @@ -13,7 +13,8 @@ private void ValidateTypeIsNotNullOnRetrieveProperties(Type type) { if (type is null) { - throw new NullTypeException(); + throw new NullTypeException( + message: "Type is null."); } } } diff --git a/RESTFulSense/Services/Foundations/Types/TypeService.Exceptions.cs b/RESTFulSense/Services/Foundations/Types/TypeService.Exceptions.cs index 60b6afd0..381d13a2 100644 --- a/RESTFulSense/Services/Foundations/Types/TypeService.Exceptions.cs +++ b/RESTFulSense/Services/Foundations/Types/TypeService.Exceptions.cs @@ -20,7 +20,10 @@ private Type TryCatch(ReturningTypeFunction returningTypeFunction) } catch (NullObjectException nullObjectException) { - var typeValidationException = new TypeValidationException(nullObjectException); + var typeValidationException = new TypeValidationException( + message: "Type validation errors occurred, fix errors and try again.", + innerException: nullObjectException); + throw typeValidationException; } catch (ArgumentNullException argumentNullException) @@ -57,10 +60,14 @@ private static TypeDependencyValidationException CreateDependencyValidationExcep Exception exception) { var failedTypeDependencyValidationException = - new FailedTypeDependencyValidationException(exception); + new FailedTypeDependencyValidationException( + message: "Failed type dependency validation error occurred, fix errors and try again.", + innerException: exception); var typeDependencyValidationException = - new TypeDependencyValidationException(failedTypeDependencyValidationException); + new TypeDependencyValidationException( + message: "Type dependency validation occurred, fix errors and try again.", + innerException: failedTypeDependencyValidationException); return typeDependencyValidationException; } @@ -68,10 +75,14 @@ private static TypeDependencyValidationException CreateDependencyValidationExcep private static TypeDependencyException CreateDependencyException(Exception exception) { var failedTypeDependencyException = - new FailedTypeDependencyException(exception); + new FailedTypeDependencyException( + message: "Type dependency error occurred, contact support.", + innerException: exception); var typeDependencyException = - new TypeDependencyException(failedTypeDependencyException); + new TypeDependencyException( + message: "Type dependency error occurred, contact support.", + innerException: failedTypeDependencyException); return typeDependencyException; } @@ -79,10 +90,14 @@ private static TypeDependencyException CreateDependencyException(Exception excep private static TypeServiceException CreateServiceException(Exception exception) { var failedTypeServiceException = - new FailedTypeServiceException(exception); + new FailedTypeServiceException( + message: "Failed Type Service Exception occurred, please contact support for assistance.", + innerException: exception); var typeServiceException = - new TypeServiceException(failedTypeServiceException); + new TypeServiceException( + message: "Type service error occurred, contact support.", + innerException : failedTypeServiceException); return typeServiceException; } diff --git a/RESTFulSense/Services/Foundations/Types/TypeService.Validations.cs b/RESTFulSense/Services/Foundations/Types/TypeService.Validations.cs index e61a302a..6e13e342 100644 --- a/RESTFulSense/Services/Foundations/Types/TypeService.Validations.cs +++ b/RESTFulSense/Services/Foundations/Types/TypeService.Validations.cs @@ -12,7 +12,8 @@ private void ValidateObjectIsNotNullOnRetrieve(object @object) { if (@object is null) { - throw new NullObjectException(); + throw new NullObjectException( + message: "Object is null."); } } } diff --git a/RESTFulSense/Services/Foundations/Values/ValueService.Exceptions.cs b/RESTFulSense/Services/Foundations/Values/ValueService.Exceptions.cs index 0e88c509..1bc067b3 100644 --- a/RESTFulSense/Services/Foundations/Values/ValueService.Exceptions.cs +++ b/RESTFulSense/Services/Foundations/Values/ValueService.Exceptions.cs @@ -20,10 +20,14 @@ private object TryCatch(ReturningObjectFunction returningObjectFunction) catch (Exception exception) { var failedValueServiceException = - new FailedValueServiceException(exception); + new FailedValueServiceException( + message: "Failed Value Service Exception occurred, please contact support for assistance.", + innerException: exception); var valueServiceException = - new ValueServiceException(failedValueServiceException); + new ValueServiceException( + message: "Value service error occurred, contact support.", + innerException: failedValueServiceException); throw valueServiceException; } diff --git a/RESTFulSense/Services/Orchestrations/Forms/FormOrchestrationService.Exceptions.cs b/RESTFulSense/Services/Orchestrations/Forms/FormOrchestrationService.Exceptions.cs index 59824920..172f3166 100644 --- a/RESTFulSense/Services/Orchestrations/Forms/FormOrchestrationService.Exceptions.cs +++ b/RESTFulSense/Services/Orchestrations/Forms/FormOrchestrationService.Exceptions.cs @@ -24,101 +24,131 @@ private FormModel TryCatch(ReturningFormModelFunction returningFormModelFunction catch (NullFormModelException nullFormModelException) { var formOrchestrationValidationException = - new FormOrchestrationValidationException(nullFormModelException); + new FormOrchestrationValidationException( + message: "Form orchestration validation errors occurred, please try again.", + innerException: nullFormModelException); throw formOrchestrationValidationException; } catch (AttributeValidationException attributeValidationException) { var formOrchestrationDependencyValidationException = - new FormOrchestrationDependencyValidationException(attributeValidationException); + new FormOrchestrationDependencyValidationException( + message: "Form orchestration dependency validation error occurred, fix the errors and try again.", + innerException: attributeValidationException); throw formOrchestrationDependencyValidationException; } catch (AttributeDependencyValidationException attributeDependencyValidationException) { var formOrchestrationDependencyValidationException = - new FormOrchestrationDependencyValidationException(attributeDependencyValidationException); + new FormOrchestrationDependencyValidationException( + message: "Form orchestration dependency validation error occurred, fix the errors and try again.", + innerException: attributeDependencyValidationException); throw formOrchestrationDependencyValidationException; } catch (ValueValidationException valueValidationException) { var formOrchestrationDependencyValidationException = - new FormOrchestrationDependencyValidationException(valueValidationException); + new FormOrchestrationDependencyValidationException( + message: "Form orchestration dependency validation error occurred, fix the errors and try again.", + innerException: valueValidationException); throw formOrchestrationDependencyValidationException; } catch (ValueDependencyValidationException valueDependencyValidationException) { var formOrchestrationDependencyValidationException = - new FormOrchestrationDependencyValidationException(valueDependencyValidationException); + new FormOrchestrationDependencyValidationException( + message: "Form orchestration dependency validation error occurred, fix the errors and try again.", + innerException: valueDependencyValidationException); throw formOrchestrationDependencyValidationException; } catch (FormValidationException formValidationException) { var formOrchestrationDependencyValidationException = - new FormOrchestrationDependencyValidationException(formValidationException); + new FormOrchestrationDependencyValidationException( + message: "Form orchestration dependency validation error occurred, fix the errors and try again.", + innerException: formValidationException); throw formOrchestrationDependencyValidationException; } catch (FormDependencyValidationException formDependencyValidationException) { var formOrchestrationDependencyValidationException = - new FormOrchestrationDependencyValidationException(formDependencyValidationException); + new FormOrchestrationDependencyValidationException( + message: "Form orchestration dependency validation error occurred, fix the errors and try again.", + innerException: formDependencyValidationException); throw formOrchestrationDependencyValidationException; } catch (AttributeDependencyException attributeDependencyException) { var formOrchestrationDependencyException = - new FormOrchestrationDependencyException(attributeDependencyException); + new FormOrchestrationDependencyException( + message: "Form orchestration dependency validation error occurred, fix the errors and try again.", + innerException: attributeDependencyException); throw formOrchestrationDependencyException; } catch (AttributeServiceException attributeServiceException) { var formOrchestrationDependencyException = - new FormOrchestrationDependencyException(attributeServiceException); + new FormOrchestrationDependencyException( + message: "Form orchestration dependency validation error occurred, fix the errors and try again.", + innerException: attributeServiceException); throw formOrchestrationDependencyException; } catch (ValueDependencyException valueDependencyException) { var formOrchestrationDependencyException = - new FormOrchestrationDependencyException(valueDependencyException); + new FormOrchestrationDependencyException( + message: "Form orchestration dependency validation error occurred, fix the errors and try again.", + innerException: valueDependencyException); throw formOrchestrationDependencyException; } catch (ValueServiceException valueServiceException) { var formOrchestrationDependencyException = - new FormOrchestrationDependencyException(valueServiceException); + new FormOrchestrationDependencyException( + message: "Form orchestration dependency validation error occurred, fix the errors and try again.", + innerException: valueServiceException); throw formOrchestrationDependencyException; } catch (FormDependencyException formDependencyException) { var formOrchestrationDependencyException = - new FormOrchestrationDependencyException(formDependencyException); + new FormOrchestrationDependencyException( + message: "Form orchestration dependency validation error occurred, fix the errors and try again.", + innerException: formDependencyException); throw formOrchestrationDependencyException; } catch (FormServiceException formServiceException) { var formOrchestrationDependencyException = - new FormOrchestrationDependencyException(formServiceException); + new FormOrchestrationDependencyException( + message: "Form orchestration dependency validation error occurred, fix the errors and try again.", + innerException: formServiceException); throw formOrchestrationDependencyException; } catch (Exception exception) { var failedFormOrchestrationServiceException = - new FailedFormOrchestrationServiceException(exception); + new FailedFormOrchestrationServiceException( + message: "Failed form orchestration service occurred, please contact support", + innerException: exception); var formOrchestrationServiceException = - new FormOrchestrationServiceException(failedFormOrchestrationServiceException); + new FormOrchestrationServiceException( + message: "Form orchestration service error occurred, contact support.", + innerException: failedFormOrchestrationServiceException); throw formOrchestrationServiceException; } diff --git a/RESTFulSense/Services/Orchestrations/Forms/FormOrchestrationService.Validations.cs b/RESTFulSense/Services/Orchestrations/Forms/FormOrchestrationService.Validations.cs index 4485f4b4..3568a1e2 100644 --- a/RESTFulSense/Services/Orchestrations/Forms/FormOrchestrationService.Validations.cs +++ b/RESTFulSense/Services/Orchestrations/Forms/FormOrchestrationService.Validations.cs @@ -14,7 +14,8 @@ private void ValidateFormModelIsNotNull(FormModel formModel) { if (formModel is null) { - throw new NullFormModelException(); + throw new NullFormModelException( + message: "Form model is null. Please correct the errors and try again."); } } diff --git a/RESTFulSense/Services/Orchestrations/Properties/PropertyOrchestrationService.Exceptions.cs b/RESTFulSense/Services/Orchestrations/Properties/PropertyOrchestrationService.Exceptions.cs index b3ee8eb5..e7a8298b 100644 --- a/RESTFulSense/Services/Orchestrations/Properties/PropertyOrchestrationService.Exceptions.cs +++ b/RESTFulSense/Services/Orchestrations/Properties/PropertyOrchestrationService.Exceptions.cs @@ -23,80 +23,104 @@ private PropertyModel TryCatch(ReturningPropertyModelFunction returningPropertyM catch (NullPropertyModelException nullPropertyModelException) { var propertyOrchestrationValidationException = - new PropertyOrchestrationValidationException(nullPropertyModelException); + new PropertyOrchestrationValidationException( + message: "Property validation error occurred, fix errors and try again.", + innerException: nullPropertyModelException); throw propertyOrchestrationValidationException; } catch (Models.Orchestrations.Properties.Exceptions.NullObjectException nullObjectException) { var propertyOrchestrationValidationException = - new PropertyOrchestrationValidationException(nullObjectException); + new PropertyOrchestrationValidationException( + message: "Property validation error occurred, fix errors and try again.", + innerException: nullObjectException); throw propertyOrchestrationValidationException; } catch (TypeValidationException typeValidationException) { var propertyOrchestrationDependencyValidationException = - new PropertyOrchestrationDependencyValidationException(typeValidationException); + new PropertyOrchestrationDependencyValidationException( + message: "Property orchestration dependency validation error occurred, fix errors and try again.", + innerException: typeValidationException); throw propertyOrchestrationDependencyValidationException; } catch (TypeDependencyValidationException typeDependencyValidationException) { var propertyOrchestrationDependencyValidationException = - new PropertyOrchestrationDependencyValidationException(typeDependencyValidationException); + new PropertyOrchestrationDependencyValidationException( + message: "Property orchestration dependency validation error occurred, fix errors and try again.", + innerException: typeDependencyValidationException); throw propertyOrchestrationDependencyValidationException; } catch (PropertyValidationException propertyValidationException) { var propertyOrchestrationDependencyValidationException = - new PropertyOrchestrationDependencyValidationException(propertyValidationException); + new PropertyOrchestrationDependencyValidationException( + message: "Property orchestration dependency validation error occurred, fix errors and try again.", + innerException: propertyValidationException); throw propertyOrchestrationDependencyValidationException; } catch (PropertyDependencyValidationException propertyDependencyValidationException) { var propertyOrchestrationDependencyValidationException = - new PropertyOrchestrationDependencyValidationException(propertyDependencyValidationException); + new PropertyOrchestrationDependencyValidationException( + message: "Property orchestration dependency validation error occurred, fix errors and try again.", + innerException: propertyDependencyValidationException); throw propertyOrchestrationDependencyValidationException; } catch (TypeDependencyException typeDependencyException) { var propertyOrchestrationDependencyException = - new PropertyOrchestrationDependencyException(typeDependencyException); + new PropertyOrchestrationDependencyException( + message: "Property orchestration dependency error occurred, fix errors and try again.", + innerException: typeDependencyException); throw propertyOrchestrationDependencyException; } catch (TypeServiceException typeServiceException) { var propertyOrchestrationDependencyException = - new PropertyOrchestrationDependencyException(typeServiceException); + new PropertyOrchestrationDependencyException( + message: "Property orchestration dependency error occurred, fix errors and try again.", + innerException: typeServiceException); throw propertyOrchestrationDependencyException; } catch (PropertyDependencyException propertyDependencyException) { var propertyOrchestrationDependencyException = - new PropertyOrchestrationDependencyException(propertyDependencyException); + new PropertyOrchestrationDependencyException( + message: "Property orchestration dependency error occurred, fix errors and try again.", + innerException: propertyDependencyException); throw propertyOrchestrationDependencyException; } catch (PropertyServiceException propertyServiceException) { var propertyOrchestrationDependencyException = - new PropertyOrchestrationDependencyException(propertyServiceException); + new PropertyOrchestrationDependencyException( + message: "Property orchestration dependency error occurred, fix errors and try again.", + innerException: propertyServiceException); throw propertyOrchestrationDependencyException; } catch (Exception exception) { var failedPropertyOrchestrationException = - new FailedPropertyOrchestrationException(exception); + new FailedPropertyOrchestrationException( + message: "Failed property orchestration service exception occurred, please contact support.", + innerException: exception); var propertyPropertyOrchestrationException = - new PropertyOrchestrationServiceException(failedPropertyOrchestrationException); + new PropertyOrchestrationServiceException( + message: "Property orchestration service error occurred, contact support.", + innerException: failedPropertyOrchestrationException); throw propertyPropertyOrchestrationException; } diff --git a/RESTFulSense/Services/Orchestrations/Properties/PropertyOrchestrationService.Validations.cs b/RESTFulSense/Services/Orchestrations/Properties/PropertyOrchestrationService.Validations.cs index d3c41403..e772d7b5 100644 --- a/RESTFulSense/Services/Orchestrations/Properties/PropertyOrchestrationService.Validations.cs +++ b/RESTFulSense/Services/Orchestrations/Properties/PropertyOrchestrationService.Validations.cs @@ -21,7 +21,10 @@ private static void ValidatePropertyModelIsNotNull(PropertyModel propertyModel) if (propertyModel is null) { var argumentNullException = new ArgumentNullException(nameof(propertyModel)); - var nullPropertyModelException = new NullPropertyModelException(argumentNullException); + + var nullPropertyModelException = new NullPropertyModelException( + message: "PropertyModel is null, fix errors and try again.", + innerException: argumentNullException); throw nullPropertyModelException; } @@ -31,7 +34,10 @@ private static void ValidateObjectIsNotNull(PropertyModel propertyModel) if (propertyModel.Object is null) { var argumentNullException = new ArgumentNullException(nameof(propertyModel.Object)); - var nullObjectException = new NullObjectException(argumentNullException); + + var nullObjectException = new NullObjectException( + message: "Object is null, fix errors and try again.", + innerException: argumentNullException); throw nullObjectException; }