From a9d58fdb333567ff4be49f45c1205c2ac15bf12a Mon Sep 17 00:00:00 2001 From: Daniel Hampe Date: Fri, 23 Sep 2011 12:37:25 +0200 Subject: [PATCH] [GRAPHDB-499] refactored all exception constructors to also take a parameter for passing an inner exception --- ...ggregateOrFunctionDoesNotExistException.cs | 3 ++- .../Attribute/AGraphDBAttributeException.cs | 6 +++++ .../MandatoryConstraintViolationException.cs | 3 ++- .../PropertyHasWrongTypeException.cs | 15 +++++++++-- .../DBObjectErrors/AGraphDBObjectException.cs | 7 +++++ .../DBObjectCollisionException.cs | 3 ++- .../EdgeTypeDoesNotExistException.cs | 3 ++- .../AGraphDBVertexTypeException.cs | 9 ++++++- .../Expression/InvalidExpressionException.cs | 11 ++++++-- .../InvalidLikeOperationException.cs | 3 ++- .../AGraphDBIncomingEdgeException.cs | 9 ++++++- ...comingEdgeDestinationIsInvalidException.cs | 3 ++- ...eForNotReferenceAttributeTypesException.cs | 3 ++- .../IndexErrors/AGraphDBIndexException.cs | 9 ++++++- .../IndexErrors/IndexAlreadyExistException.cs | 3 ++- .../IndexAttributeDoesNotExistException.cs | 3 ++- .../IndexErrors/IndexCreationException.cs | 4 +-- .../IndexErrors/IndexDoesNotExistException.cs | 3 ++- .../IndexErrors/IndexRemoveException.cs | 10 +++++-- .../IndexTypeDoesNotExistException.cs | 3 ++- .../IndexUniqueConstrainViolationException.cs | 3 ++- .../InvalidIndexAttributeException.cs | 4 +-- .../RebuildIndicesFaildException.cs | 3 ++- .../QueryPlan/InvalidExpressionException.cs | 3 ++- .../ErrorHandling/UnknownDBException.cs | 27 ++++++++++--------- .../AGraphDBVertexAttributeException.cs | 7 +++++ ...vedVertexAttributeIsNotAllowedException.cs | 3 ++- ...ropOfVertexAttributeNotAllowedException.cs | 4 ++- .../InvalidAlterVertexTypeException.cs | 7 ++++- .../InvalidVertexAttributeNameException.cs | 3 ++- ...nvalidVertexAttributeSelectionException.cs | 3 ++- .../TargetVertexTypeNotFoundException.cs | 4 ++- .../UndefinedAttributesException.cs | 5 +++- .../VertexAttributeAlreadyExistsException.cs | 6 +++-- ...VertexAttributeExistsInSubtypeException.cs | 6 +++-- ...tributeExistsInSuperVertexTypeException.cs | 6 +++-- .../VertexAttributeIsNotDefinedException.cs | 6 +++-- .../AGraphDBVertexTypeException.cs | 8 ++++++ .../InvalidBaseVertexTypeException.cs | 3 ++- .../InvalidVertexTypeException.cs | 3 ++- .../ListAttributeNotAllowedException.cs | 3 ++- .../ParentVertexTypeDoesNotExistException.cs | 3 ++- ...ncateNotAllowedOnInheritedTypeException.cs | 3 ++- .../UselessVertexTypeException.cs | 7 ++++- .../VertexTypeAlreadyExistException.cs | 3 ++- .../VertexTypeDoesNotExistException.cs | 3 ++- .../VertexTypeDoesNotMatchException.cs | 3 ++- .../VertexTypeRemoveException.cs | 3 ++- .../ErrorHandling/AGraphDSException.cs | 17 ++++++++++++ .../QueryLanguageNotFoundException.cs | 6 ++--- .../RESTServiceCouldNotStartetException.cs | 6 ++--- .../ErrorHandling/AGraphFSException.cs | 9 +++++++ ...dNotFindStructuredEdgePropertyException.cs | 3 ++- ...otFindStructuredVertexPropertyException.cs | 3 ++- ...otFindUnStructuredEdgePropertyException.cs | 3 ++- ...FindUnStructuredVertexPropertyException.cs | 4 ++- .../ErrorHandling/UnknownFSException.cs | 13 +++------ .../VertexAlreadyExistException.cs | 3 ++- .../VertexDoesNotExistException.cs | 3 ++- .../VertexTypeDoesNotExistException.cs | 3 ++- .../ErrorHandling/AGraphQLException.cs | 7 +++++ .../ASonesQLAggregateException.cs | 9 ++++++- ...ggregateDoesNotMatchGroupLevelException.cs | 3 ++- ...egateIsNotValidOnThisAttributeException.cs | 3 ++- .../AggregateNotAllowedException.cs | 3 ++- ...ateOnMultiAttributesNotAllowedException.cs | 7 ++++- ...ggregateParameterCountMismatchException.cs | 8 ++++-- .../NotImplementedAggregateTargetException.cs | 3 ++- .../UnknownAggregateException.cs | 10 ++----- .../AGraphQLAttributeAssignmentException.cs | 8 ++++++ .../InvalidAssignOfSetException.cs | 3 ++- ...alidAttrDefaultValueAssignmentException.cs | 14 +++++++--- ...ReferenceAssignmentOfUndefAttrException.cs | 5 +++- .../InvalidUndefAttrTypeException.cs | 3 ++- .../ReferenceAssignmentEmptyValueException.cs | 3 ++- .../ReferenceAssignmentException.cs | 3 ++- .../ReferenceAssignmentExpectedException.cs | 3 ++- .../DataTypeDoesNotMatchException.cs | 3 ++- .../DumpErrors/AGraphQLDumpException.cs | 10 ++++++- .../DumpErrors/InvalidDumpFormatException.cs | 3 ++- .../DumpErrors/InvalidDumpTypeException.cs | 3 ++- .../NotADumpableGrammarException.cs | 6 ++--- .../DuplicateReferenceOccurrenceException.cs | 3 ++- .../EdgeErrors/AGraphQLEdgeException.cs | 7 +++++ .../EdgeParameterCountMismatchException.cs | 4 ++- .../TooManyElementsForEdgeException.cs | 3 ++- .../AGraphQLFunctionException.cs | 10 ++++++- .../FunctionDoesNotExistException.cs | 3 ++- ...ctionParameterInvalidReferenceException.cs | 3 ++- .../InvalidFunctionBaseException.cs | 3 ++- .../IndexErrors/AGraphQLIndexException.cs | 8 ++++++ .../CouldNotAlterIndexOnTypeException.cs | 3 ++- .../InvalidIndexOperationException.cs | 3 ++- .../ErrorHandling/InvalidIDNodeException.cs | 3 ++- .../ErrorHandling/InvalidTupleException.cs | 3 ++- .../NotImpementedExpressionNodeException.cs | 3 ++- .../NotImplementedQLException.cs | 8 +++--- .../AGraphQLOperatorException.cs | 7 +++++ .../InvalidInRangeIntervalException.cs | 3 ++- .../InvalidInRangeOperationException.cs | 3 ++- .../OperatorDoesNotExistException.cs | 3 ++- .../ErrorHandling/Replace/ReplaceException.cs | 7 ++++- .../SelectErrors/AGraphQLSelectException.cs | 8 ++++++ .../DuplicateAttributeSelectionException.cs | 3 ++- .../GroupedAttributeIsNotSelectedException.cs | 3 ++- .../InvalidGroupByLevelException.cs | 4 ++- .../InvalidSelectValueAssignmentException.cs | 3 ++- .../SelectErrors/MultipleResultsException.cs | 3 ++- .../NoGroupingArgumentException.cs | 3 ++- .../SelectErrors/SelectTimeOutException.cs | 3 ++- ...AssignmentDataTypeDoesNotMatchException.cs | 3 ++- .../ErrorHandling/UnknownQLException.cs | 12 +++------ .../AGraphQLVertexAttributeException.cs | 10 ++++++- .../AmbiguousVertexAttributeException.cs | 3 ++- ...idUndefinedVertexAttributeNameException.cs | 5 +++- ...validUndefinedVertexAttributesException.cs | 12 ++++++--- .../InvalidVertexAttributeException.cs | 3 ++- .../InvalidVertexAttributeKindException.cs | 3 ++- .../InvalidVertexAttributeValueException.cs | 3 ++- .../RemoveVertexTypeAttributeException.cs | 4 ++- ...eListVertexAttributeNoElementsException.cs | 3 ++- .../UpdateVertexAttributeValueException.cs | 3 ++- ...ggregateOrFunctionDoesNotExistException.cs | 11 ++++---- .../EdgeTypeDoesNotExistException.cs | 3 ++- .../ExpressionGraphInternalException.cs | 7 ++++- .../GQLGrammarSetExtandableMemberException.cs | 3 ++- .../ErrorHandling/GQLParsingException.cs | 15 +++++------ .../GQLStatementNodeExecutionException.cs | 9 +++---- .../ErrorHandling/GqlSyntaxException.cs | 21 +++++---------- .../IndexTypeDoesNotExistException.cs | 3 ++- .../InvalidBinaryExpressionException.cs | 7 ++++- .../InvalidDumpFormatException.cs | 3 ++- .../ErrorHandling/InvalidDumpTypeException.cs | 3 ++- .../InvalidEdgeListOperationException.cs | 18 +++++++++++-- .../InvalidLevelKeyOperationException.cs | 18 +++++++++++-- ...validTransactionIsolationLevelException.cs | 8 +++++- .../IronyInitializeGrammarException.cs | 8 +++++- .../NotADumpableGrammarException.cs | 3 ++- .../VertexTypeDoesNotExistException.cs | 3 ++- .../ErrorHandling/ACollectionException.cs | 6 +++++ .../InvalidCollectionComparismException.cs | 3 ++- .../ErrorHandling/UnknownException.cs | 7 ++--- .../BinaryNotExistentException.cs | 3 ++- .../ErrorHandling/ASettingsException.cs | 8 ++++++ .../CouldNotLoadSettingFileException.cs | 3 ++- .../DataTypeMismatchException.cs | 3 ++- .../InvalidXMLFormatException.cs | 3 ++- .../ErrorHandling/APluginManagerException.cs | 7 +++++ .../CouldNotLoadAssemblyException.cs | 2 +- .../ErrorHandling/DuplicatePluginException.cs | 4 ++- .../IncompatiblePluginVersionException.cs | 3 ++- .../ErrorHandling/UnknownPluginException.cs | 3 ++- .../XML_IO/ErrorHandling/QueryException.cs | 8 ++++-- .../ErrorHandling/XmlValidationException.cs | 8 ++++-- .../ErrorHandling/XmlVersionException.cs | 8 ++++-- .../InvalidArithmeticAggregationException.cs | 9 ++++++- .../ASonesQLGraphDBExportException.cs | 9 ++++++- .../ErrorHandling/ExportFailedException.cs | 8 +++++- .../InvalidDumpLocationException.cs | 11 +++++++- .../ErrorHandling/StreamReaderException.cs | 9 +++++-- .../ErrorHandling/StreamWriterException.cs | 14 ++++++---- .../TypeDoesNotExistException.cs | 8 +++++- .../ASonesQLGraphDBImportException.cs | 9 ++++++- .../ErrorHandling/ImportFailedException.cs | 21 ++++++++++----- .../ASonesQLAggregateException.cs | 6 +++++ .../GQLAggregateArgumentException.cs | 3 ++- .../ASonesQLFunctionException.cs | 11 ++++++-- ...FunctionParameterCountMismatchException.cs | 7 +++-- .../FunctionParameterTypeMismatchException.cs | 8 +++++- .../InvalidFunctionParameterException.cs | 4 ++- .../ErrorHandling/UnknownFunctionException.cs | 12 +++------ .../ErrorHandling/ASonesIndexException.cs | 15 ++++++++++- .../UniqueIndexConstraintException.cs | 7 ++++- .../ErrorHandling/UnknownIndexException.cs | 13 +++------ 174 files changed, 755 insertions(+), 283 deletions(-) diff --git a/GraphDB/IGraphDB/ErrorHandling/AggregateOrFunctionDoesNotExistException.cs b/GraphDB/IGraphDB/ErrorHandling/AggregateOrFunctionDoesNotExistException.cs index 3109a2ae..fae70ba3 100644 --- a/GraphDB/IGraphDB/ErrorHandling/AggregateOrFunctionDoesNotExistException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/AggregateOrFunctionDoesNotExistException.cs @@ -33,7 +33,8 @@ public sealed class AggregateOrFunctionDoesNotExistException : AGraphDBException /// Creates a new AggregateOrFunctionDoesNotExistException exception /// /// - public AggregateOrFunctionDoesNotExistException(String myAggregateOrFunctionName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AggregateOrFunctionDoesNotExistException(String myAggregateOrFunctionName, Exception innerException = null) : base(innerException) { AggregateOrFunctionName = myAggregateOrFunctionName; _msg = String.Format("The aggregate or function \"{0}\" does not exist!", AggregateOrFunctionName); diff --git a/GraphDB/IGraphDB/ErrorHandling/Attribute/AGraphDBAttributeException.cs b/GraphDB/IGraphDB/ErrorHandling/Attribute/AGraphDBAttributeException.cs index 9b337836..34d37d4a 100644 --- a/GraphDB/IGraphDB/ErrorHandling/Attribute/AGraphDBAttributeException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/Attribute/AGraphDBAttributeException.cs @@ -30,5 +30,11 @@ namespace sones.GraphDB.ErrorHandling /// public abstract class AGraphDBAttributeException : AGraphDBException { + /// + /// Initializes a new instance of the AGraphDBAttributeException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AGraphDBAttributeException(Exception innerException = null) : base(innerException) + {} } } diff --git a/GraphDB/IGraphDB/ErrorHandling/Attribute/MandatoryConstraintViolationException.cs b/GraphDB/IGraphDB/ErrorHandling/Attribute/MandatoryConstraintViolationException.cs index dfe60d79..dfe72aa7 100644 --- a/GraphDB/IGraphDB/ErrorHandling/Attribute/MandatoryConstraintViolationException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/Attribute/MandatoryConstraintViolationException.cs @@ -33,7 +33,8 @@ public sealed class MandatoryConstraintViolationException : AGraphDBAttributeExc /// Creates a new MandatoryConstraintViolationException exception /// /// The mandatory constraint info message - public MandatoryConstraintViolationException(String myMandatoryConstraint) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public MandatoryConstraintViolationException(String myMandatoryConstraint, Exception innerException = null) : base(innerException) { MandatoryConstraint = myMandatoryConstraint; _msg = String.Format("The mandatory constraint \"{0}\" was violated!", MandatoryConstraint); diff --git a/GraphDB/IGraphDB/ErrorHandling/Attribute/PropertyHasWrongTypeException.cs b/GraphDB/IGraphDB/ErrorHandling/Attribute/PropertyHasWrongTypeException.cs index 439bd190..9c8a48c2 100644 --- a/GraphDB/IGraphDB/ErrorHandling/Attribute/PropertyHasWrongTypeException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/Attribute/PropertyHasWrongTypeException.cs @@ -65,7 +65,9 @@ public class PropertyHasWrongTypeException : AGraphDBAttributeException /// The property that was used with the wrong type. /// The expected type name. /// The type name of the value. - public PropertyHasWrongTypeException(String myDefiningTypeName, String myPropertyName, String myExpectedTypeName, String myUnexpectedTypeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public PropertyHasWrongTypeException(String myDefiningTypeName, String myPropertyName, String myExpectedTypeName, String myUnexpectedTypeName, Exception innerException = null) + : base(innerException) { DefiningTypeName = myDefiningTypeName; PropertyName = myPropertyName; @@ -74,7 +76,16 @@ public PropertyHasWrongTypeException(String myDefiningTypeName, String myPropert _msg = string.Format("The property {0}.[1} needs a value of type {2} but was used with a value of type {3}", myDefiningTypeName, myPropertyName, myExpectedTypeName, myUnexpectedTypeName); } - public PropertyHasWrongTypeException(String myDefiningTypeName, String myPropertyName, PropertyMultiplicity myMultiplicity, String myExpectedTypeName) + /// + /// Initializes a new instance of the PropertyHasWrongTypeException class. + /// + /// The type that defines the property. + /// The property that was used with the wrong type. + /// + /// The expected type name. + /// The exception that is the cause of the current exception, this parameter can be NULL. + public PropertyHasWrongTypeException(String myDefiningTypeName, String myPropertyName, PropertyMultiplicity myMultiplicity, String myExpectedTypeName, Exception innerException = null) + : base(innerException) { DefiningTypeName = myDefiningTypeName; PropertyName = myPropertyName; diff --git a/GraphDB/IGraphDB/ErrorHandling/DBObjectErrors/AGraphDBObjectException.cs b/GraphDB/IGraphDB/ErrorHandling/DBObjectErrors/AGraphDBObjectException.cs index d9519952..4112260b 100644 --- a/GraphDB/IGraphDB/ErrorHandling/DBObjectErrors/AGraphDBObjectException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/DBObjectErrors/AGraphDBObjectException.cs @@ -18,9 +18,16 @@ * */ +using System; namespace sones.GraphDB.ErrorHandling { public abstract class AGraphDBObjectException : AGraphDBException { + /// + /// Initializes a new instance of the AGraphDBObjectException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AGraphDBObjectException(Exception innerException = null) : base(innerException) + {} } } diff --git a/GraphDB/IGraphDB/ErrorHandling/DBObjectErrors/DBObjectCollisionException.cs b/GraphDB/IGraphDB/ErrorHandling/DBObjectErrors/DBObjectCollisionException.cs index 0a1b2d01..f512b904 100644 --- a/GraphDB/IGraphDB/ErrorHandling/DBObjectErrors/DBObjectCollisionException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/DBObjectErrors/DBObjectCollisionException.cs @@ -34,7 +34,8 @@ public sealed class DBObjectCollisionException : AGraphDBObjectException /// Creates a new DBObjectCollisionException exception /// /// The given DBObject - public DBObjectCollisionException(String myOBject) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public DBObjectCollisionException(String myOBject, Exception innerException = null) : base(innerException) { Object = myOBject; _msg = String.Format("A DBObject collision occurred. The DBObject with attributes \"{0}\" has been inserted with a VertexID that already exists!", Object); diff --git a/GraphDB/IGraphDB/ErrorHandling/EdgeTypeDoesNotExistException.cs b/GraphDB/IGraphDB/ErrorHandling/EdgeTypeDoesNotExistException.cs index 3b5a8e10..f13636b0 100644 --- a/GraphDB/IGraphDB/ErrorHandling/EdgeTypeDoesNotExistException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/EdgeTypeDoesNotExistException.cs @@ -33,7 +33,8 @@ public sealed class EdgeTypeDoesNotExistException : AGraphDBException /// Creates a new EdgeTypeDoesNotExistException exception /// /// - public EdgeTypeDoesNotExistException(String myEdgeType) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public EdgeTypeDoesNotExistException(String myEdgeType, Exception innerException = null) : base(innerException) { EdgeType = myEdgeType; _msg = String.Format("The edgetype \"{0}\" does not exist!", EdgeType); diff --git a/GraphDB/IGraphDB/ErrorHandling/EdgeTypeErrors/AGraphDBVertexTypeException.cs b/GraphDB/IGraphDB/ErrorHandling/EdgeTypeErrors/AGraphDBVertexTypeException.cs index e417319e..8efa8dda 100644 --- a/GraphDB/IGraphDB/ErrorHandling/EdgeTypeErrors/AGraphDBVertexTypeException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/EdgeTypeErrors/AGraphDBVertexTypeException.cs @@ -18,9 +18,16 @@ * */ +using System; namespace sones.GraphDB.ErrorHandling { public abstract class AGraphDBEdgeTypeException : AGraphDBException - { + { + /// + /// Initializes a new instance of the AGraphDBEdgeTypeException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AGraphDBEdgeTypeException(Exception innerException = null) : base(innerException) + {} } } diff --git a/GraphDB/IGraphDB/ErrorHandling/Expression/InvalidExpressionException.cs b/GraphDB/IGraphDB/ErrorHandling/Expression/InvalidExpressionException.cs index a8b17320..cf835a5d 100644 --- a/GraphDB/IGraphDB/ErrorHandling/Expression/InvalidExpressionException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/Expression/InvalidExpressionException.cs @@ -46,12 +46,19 @@ public sealed class InvalidExpressionException : AGraphDBException /// Creates a new invalid expression exception /// /// The expression that has been declared as invalid - public InvalidExpressionException(IExpression myInvalidExpression) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidExpressionException(IExpression myInvalidExpression, Exception innerException = null) : base(innerException) { InvalidExpression = myInvalidExpression; } - public InvalidExpressionException(String myVertexTypeName, long myVertexID) + /// + /// Initializes a new instance of the InvalidExpressionException class using the specified vertex type name and vertex ID. + /// + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidExpressionException(String myVertexTypeName, long myVertexID, Exception innerException = null) : base(innerException) { VertexTypeName = myVertexTypeName; VertexID = myVertexID; diff --git a/GraphDB/IGraphDB/ErrorHandling/Expression/InvalidLikeOperationException.cs b/GraphDB/IGraphDB/ErrorHandling/Expression/InvalidLikeOperationException.cs index 9c565053..883072c0 100644 --- a/GraphDB/IGraphDB/ErrorHandling/Expression/InvalidLikeOperationException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/Expression/InvalidLikeOperationException.cs @@ -34,7 +34,8 @@ public sealed class InvalidLikeOperationException : AGraphDBException /// Creates a new like operation exception /// /// A information about what went wrong - public InvalidLikeOperationException(String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidLikeOperationException(String myInfo, Exception innerException = null) : base(innerException) { _msg = myInfo; } diff --git a/GraphDB/IGraphDB/ErrorHandling/IncomingEdge/AGraphDBIncomingEdgeException.cs b/GraphDB/IGraphDB/ErrorHandling/IncomingEdge/AGraphDBIncomingEdgeException.cs index 257b3cd8..dd890ee3 100644 --- a/GraphDB/IGraphDB/ErrorHandling/IncomingEdge/AGraphDBIncomingEdgeException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/IncomingEdge/AGraphDBIncomingEdgeException.cs @@ -18,9 +18,16 @@ * */ +using System; namespace sones.GraphDB.ErrorHandling { public abstract class AGraphDBIncomingEdgeException : AGraphDBException - { + { + /// + /// Initializes a new instance of the AGraphDBIncomingEdgeException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AGraphDBIncomingEdgeException(Exception innerException = null) : base(innerException) + {} } } diff --git a/GraphDB/IGraphDB/ErrorHandling/IncomingEdge/IncomingEdgeDestinationIsInvalidException.cs b/GraphDB/IGraphDB/ErrorHandling/IncomingEdge/IncomingEdgeDestinationIsInvalidException.cs index 06ecdc37..25902615 100644 --- a/GraphDB/IGraphDB/ErrorHandling/IncomingEdge/IncomingEdgeDestinationIsInvalidException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/IncomingEdge/IncomingEdgeDestinationIsInvalidException.cs @@ -36,7 +36,8 @@ public sealed class IncomingEdgeDestinationIsInvalidException : AGraphDBIncoming /// /// The name of the vertex type /// The name of the vertex attribute - public IncomingEdgeDestinationIsInvalidException(String myVertexTypeName, String myVertexAttributeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public IncomingEdgeDestinationIsInvalidException(String myVertexTypeName, String myVertexAttributeName, Exception innerException = null) : base(innerException) { VertexAttributeName = myVertexAttributeName; VertexTypeName = myVertexTypeName; diff --git a/GraphDB/IGraphDB/ErrorHandling/IncomingEdge/IncomingEdgeForNotReferenceAttributeTypesException.cs b/GraphDB/IGraphDB/ErrorHandling/IncomingEdge/IncomingEdgeForNotReferenceAttributeTypesException.cs index 7937cc11..817fd7a8 100644 --- a/GraphDB/IGraphDB/ErrorHandling/IncomingEdge/IncomingEdgeForNotReferenceAttributeTypesException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/IncomingEdge/IncomingEdgeForNotReferenceAttributeTypesException.cs @@ -34,7 +34,8 @@ public sealed class IncomingEdgeForNotReferenceAttributeTypesException : AGraphD /// Creates a new IncomingEdgeForNotReferenceAttributeTypesException exception /// /// The name of the vertex attribute - public IncomingEdgeForNotReferenceAttributeTypesException(String myVertexAttributeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public IncomingEdgeForNotReferenceAttributeTypesException(String myVertexAttributeName, Exception innerException = null) : base(innerException) { VertexAttributeName = myVertexAttributeName; _msg = String.Format("You can not define incoming edges for non reference attribute \"{0}\"!", VertexAttributeName); diff --git a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/AGraphDBIndexException.cs b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/AGraphDBIndexException.cs index 2cba7636..ac559330 100644 --- a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/AGraphDBIndexException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/AGraphDBIndexException.cs @@ -18,9 +18,16 @@ * */ +using System; namespace sones.GraphDB.ErrorHandling { public abstract class AGraphDBIndexException : AGraphDBException - { + { + /// + /// Initializes a new instance of the AGraphDBIndexException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AGraphDBIndexException(Exception innerException = null) : base(innerException) + {} } } diff --git a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexAlreadyExistException.cs b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexAlreadyExistException.cs index a5f0a74c..3e8ab7d5 100644 --- a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexAlreadyExistException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexAlreadyExistException.cs @@ -34,7 +34,8 @@ public sealed class IndexAlreadyExistException : AGraphDBIndexException /// Creates a new IndexAlreadyExistException exception /// /// The name of the index - public IndexAlreadyExistException(String myIndex) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public IndexAlreadyExistException(String myIndex, Exception innerException = null) : base(innerException) { Index = myIndex; _msg = String.Format("The index \"{0}\" already exists!", Index); diff --git a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexAttributeDoesNotExistException.cs b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexAttributeDoesNotExistException.cs index a88136c9..d312d1fc 100644 --- a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexAttributeDoesNotExistException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexAttributeDoesNotExistException.cs @@ -34,7 +34,8 @@ public sealed class IndexAttributeDoesNotExistException : AGraphDBIndexException /// Creates a new IndexAttributeDoesNotExistException exception /// /// The name of the given index attribute - public IndexAttributeDoesNotExistException(String myIndexAttributeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public IndexAttributeDoesNotExistException(String myIndexAttributeName, Exception innerException = null) : base(innerException) { IndexAttributeName = myIndexAttributeName; _msg = String.Format("The attribute \"{0}\" for the index does not exist!", IndexAttributeName); diff --git a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexCreationException.cs b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexCreationException.cs index b2d5643f..ab2bf078 100644 --- a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexCreationException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexCreationException.cs @@ -36,8 +36,8 @@ public sealed class IndexCreationException : AGraphDBIndexException /// /// The name of the invalid vertex type /// - public IndexCreationException(IndexPredefinition myIndexPredef, String myInfo) - : base() + /// The exception that is the cause of the current exception, this parameter can be NULL. + public IndexCreationException(IndexPredefinition myIndexPredef, String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; IndexPredef = myIndexPredef; diff --git a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexDoesNotExistException.cs b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexDoesNotExistException.cs index ac7c20ce..4f1d52a7 100644 --- a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexDoesNotExistException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexDoesNotExistException.cs @@ -42,7 +42,8 @@ public sealed class IndexDoesNotExistException : AGraphDBIndexException /// /// /// - public IndexDoesNotExistException(String myIndexName, String myIndexEdition) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public IndexDoesNotExistException(String myIndexName, String myIndexEdition, Exception innerException = null) : base(innerException) { IndexName = myIndexName; IndexEdition = myIndexEdition; diff --git a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexRemoveException.cs b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexRemoveException.cs index 28cfe295..f7f1a519 100644 --- a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexRemoveException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexRemoveException.cs @@ -27,8 +27,14 @@ public sealed class IndexRemoveException : AGraphDBIndexException public String Name { get; private set; } public String Edition { get; private set; } - - public IndexRemoveException(String myName, String myEdition, string myInfo) + /// + /// Initializes a new instance of the IndexRemoveException class. + /// + /// + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public IndexRemoveException(String myName, String myEdition, string myInfo, Exception innerException = null) : base(innerException) { Name = myName; Edition = myEdition; diff --git a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexTypeDoesNotExistException.cs b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexTypeDoesNotExistException.cs index ab9bba9c..27e19404 100644 --- a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexTypeDoesNotExistException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexTypeDoesNotExistException.cs @@ -35,7 +35,8 @@ public sealed class IndexTypeDoesNotExistException : AGraphDBIndexException /// Creates a new IndexTypeDoesNotExistException exception /// /// - public IndexTypeDoesNotExistException(String myType, String myIndexName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public IndexTypeDoesNotExistException(String myType, String myIndexName, Exception innerException = null) : base(innerException) { IndexName = myIndexName; TypeName = myType; diff --git a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexUniqueConstrainViolationException.cs b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexUniqueConstrainViolationException.cs index da724f21..0283886e 100644 --- a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexUniqueConstrainViolationException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/IndexUniqueConstrainViolationException.cs @@ -35,7 +35,8 @@ public sealed class IndexUniqueConstrainViolationException : AGraphDBIndexExcept /// /// The name of the given type /// The name of the given index - public IndexUniqueConstrainViolationException(String myTypeName, String myIndexName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public IndexUniqueConstrainViolationException(String myTypeName, String myIndexName, Exception innerException = null) : base(innerException) { TypeName = myTypeName; IndexName = myIndexName; diff --git a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/InvalidIndexAttributeException.cs b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/InvalidIndexAttributeException.cs index 8fbdd15e..59777c03 100644 --- a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/InvalidIndexAttributeException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/InvalidIndexAttributeException.cs @@ -36,8 +36,8 @@ public sealed class InvalidIndexAttributeException : AGraphDBIndexException /// /// The name of the invalid vertex type /// - public InvalidIndexAttributeException(String myInvalidIndexAttribute, String myInfo) - : base() + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidIndexAttributeException(String myInvalidIndexAttribute, String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; InvalidAttribute = myInvalidIndexAttribute; diff --git a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/RebuildIndicesFaildException.cs b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/RebuildIndicesFaildException.cs index 9e47ba64..5fe70b30 100644 --- a/GraphDB/IGraphDB/ErrorHandling/IndexErrors/RebuildIndicesFaildException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/IndexErrors/RebuildIndicesFaildException.cs @@ -34,7 +34,8 @@ public sealed class RebuildIndicesFaildException : AGraphDBIndexException /// Creates a new IndexTypeDoesNotExistException exception /// /// - public RebuildIndicesFaildException(IEnumerable myTypes, String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public RebuildIndicesFaildException(IEnumerable myTypes, String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; TypeNames = myTypes; diff --git a/GraphDB/IGraphDB/ErrorHandling/QueryPlan/InvalidExpressionException.cs b/GraphDB/IGraphDB/ErrorHandling/QueryPlan/InvalidExpressionException.cs index bab61ab8..b13df6f4 100644 --- a/GraphDB/IGraphDB/ErrorHandling/QueryPlan/InvalidExpressionException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/QueryPlan/InvalidExpressionException.cs @@ -43,7 +43,8 @@ public sealed class InvalidQueryPlanExecutionException : AGraphDBException /// Creates a new invalid query plan execution exception /// /// A description concerning the exception - public InvalidQueryPlanExecutionException(String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidQueryPlanExecutionException(String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; _msg = Info; diff --git a/GraphDB/IGraphDB/ErrorHandling/UnknownDBException.cs b/GraphDB/IGraphDB/ErrorHandling/UnknownDBException.cs index 96980cce..d88b35e0 100644 --- a/GraphDB/IGraphDB/ErrorHandling/UnknownDBException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/UnknownDBException.cs @@ -27,22 +27,23 @@ namespace sones.GraphDB.ErrorHandling /// public sealed class UnknownDBException : AGraphDBException { - /// - /// The exception that has been thrown - /// - public Exception ThrownException { get; private set; } - - #region constructor + #region constructor - public UnknownDBException(Exception e) - { - ThrownException = e; - _msg = "An unknown error has occurred."; - } + /// + /// Initializes a new instance of the UnknownDBException. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public UnknownDBException(Exception innerException = null) : this("An unknown error has occurred.", innerException) + {} - public UnknownDBException(string myMessage) + /// + /// Initializes a new instance of the UnknownDBException and specifying a custom exception. + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public UnknownDBException(string message, Exception innerException = null) : base(innerException) { - _msg = myMessage; + _msg = message; } #endregion diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/AGraphDBVertexAttributeException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/AGraphDBVertexAttributeException.cs index a561262d..02ffb502 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/AGraphDBVertexAttributeException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/AGraphDBVertexAttributeException.cs @@ -18,9 +18,16 @@ * */ +using System; namespace sones.GraphDB.ErrorHandling { public class AGraphDBVertexAttributeException : AGraphDBException { + /// + /// Initializes a new instance of the AGraphDBVertexAttributeException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AGraphDBVertexAttributeException(Exception innerException = null) : base(innerException) + {} } } diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/DropOfDerivedVertexAttributeIsNotAllowedException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/DropOfDerivedVertexAttributeIsNotAllowedException.cs index 46d912c8..3ccacbae 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/DropOfDerivedVertexAttributeIsNotAllowedException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/DropOfDerivedVertexAttributeIsNotAllowedException.cs @@ -36,7 +36,8 @@ public sealed class DropOfDerivedVertexAttributeIsNotAllowedException : AGraphDB /// /// The name of the current vertex type /// The name of the current vertex attribute - public DropOfDerivedVertexAttributeIsNotAllowedException(String myVertexTypeName, String myVertexAttributeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public DropOfDerivedVertexAttributeIsNotAllowedException(String myVertexTypeName, String myVertexAttributeName, Exception innerException = null) : base(innerException) { VertexTypeName = myVertexTypeName; VertexAttributeName = myVertexAttributeName; diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/DropOfVertexAttributeNotAllowedException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/DropOfVertexAttributeNotAllowedException.cs index 197332c1..339e9e23 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/DropOfVertexAttributeNotAllowedException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/DropOfVertexAttributeNotAllowedException.cs @@ -45,7 +45,9 @@ public sealed class DropOfVertexAttributeNotAllowedException : AGraphDBVertexAtt /// The name of the vertex type /// The name of the vertex attribute /// A dictionary of the conflicting attributes (TypeAttributeName, GraphDBType) - public DropOfVertexAttributeNotAllowedException(String myVertexTypeName, String myVertexAttributeName, Dictionary myConflictingAttributes) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public DropOfVertexAttributeNotAllowedException(String myVertexTypeName, String myVertexAttributeName, + Dictionary myConflictingAttributes, Exception innerException = null) : base(innerException) { ConflictingAttributes = myConflictingAttributes; VertexTypeName = myVertexTypeName; diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/InvalidAlterVertexTypeException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/InvalidAlterVertexTypeException.cs index 832319ed..1fa8e85d 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/InvalidAlterVertexTypeException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/InvalidAlterVertexTypeException.cs @@ -25,7 +25,12 @@ namespace sones.GraphDB.ErrorHandling public sealed class InvalidAlterVertexTypeException : AGraphDBVertexAttributeException { - public InvalidAlterVertexTypeException(String myInfo) + /// + /// Initializes a new instance of the InvalidAlterVertexTypeException class. + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidAlterVertexTypeException(String myInfo, Exception innerException = null) : base(innerException) { _msg = myInfo; } diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeNameException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeNameException.cs index 786132a4..6c09bd0b 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeNameException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeNameException.cs @@ -33,7 +33,8 @@ public sealed class InvalidVertexAttributeNameException : AGraphDBVertexAttribut /// Creates a new InvalidVertexAttributeNameException exception /// /// - public InvalidVertexAttributeNameException(String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidVertexAttributeNameException(String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; _msg = String.Format("The vertex attribute name is not valid: {0}", Info); diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeSelectionException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeSelectionException.cs index 07196deb..bc3e325f 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeSelectionException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeSelectionException.cs @@ -33,7 +33,8 @@ public sealed class InvalidVertexAttributeSelectionException : AGraphDBVertexAtt /// Creates a new InvalidVertexAttributeSelectionException exception /// /// The current selected vertex attribute - public InvalidVertexAttributeSelectionException(String mySelectedVertexAttribute) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidVertexAttributeSelectionException(String mySelectedVertexAttribute, Exception innerException = null) : base(innerException) { SelectedVertexAttribute = mySelectedVertexAttribute; _msg = String.Format("The selected vertex attribute \"{0}\" is not valid!", SelectedVertexAttribute); diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/TargetVertexTypeNotFoundException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/TargetVertexTypeNotFoundException.cs index 61abe28e..b2d193cd 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/TargetVertexTypeNotFoundException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/TargetVertexTypeNotFoundException.cs @@ -58,7 +58,9 @@ public class TargetVertexTypeNotFoundException : AGraphDBVertexAttributeExceptio /// /// The list of edges that causes the exception. /// - public TargetVertexTypeNotFoundException(VertexTypePredefinition myPredefinition, string myTargetVertexTypeName, IEnumerable myEdges) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public TargetVertexTypeNotFoundException(VertexTypePredefinition myPredefinition, string myTargetVertexTypeName, IEnumerable myEdges, + Exception innerException = null) : base(innerException) { this.Predefinition = myPredefinition; this.TargetVertexTypeName = myTargetVertexTypeName; diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/UndefinedAttributesException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/UndefinedAttributesException.cs index 7506be82..bec77887 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/UndefinedAttributesException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/UndefinedAttributesException.cs @@ -18,6 +18,8 @@ * */ +using System; + namespace sones.GraphDB.ErrorHandling { /// @@ -28,7 +30,8 @@ public sealed class UndefinedAttributesException : AGraphDBVertexAttributeExcept /// /// Creates a new UndefinedAttributesException exception /// - public UndefinedAttributesException() + /// The exception that is the cause of the current exception, this parameter can be NULL. + public UndefinedAttributesException(Exception innerException = null) : base(innerException) { _msg = "Undefined attributes can not inserted nor updated. Use the setting SETUNDEFBEHAVE to change this behaviour."; } diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/VertexAttributeAlreadyExistsException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/VertexAttributeAlreadyExistsException.cs index 0a64fd20..d6faa946 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/VertexAttributeAlreadyExistsException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/VertexAttributeAlreadyExistsException.cs @@ -34,7 +34,8 @@ public sealed class VertexAttributeAlreadyExistsException : AGraphDBVertexAttrib /// Creates a new VertexAttributeAlreadyExistsException exception /// /// The attribute name - public VertexAttributeAlreadyExistsException(String myAttributeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public VertexAttributeAlreadyExistsException(String myAttributeName, Exception innerException = null) : base(innerException) { AttributeName = myAttributeName; _msg = String.Format("The attribute \"{0}\" already exist!", AttributeName); @@ -45,7 +46,8 @@ public VertexAttributeAlreadyExistsException(String myAttributeName) /// /// The name of the type /// The attribute name - public VertexAttributeAlreadyExistsException(String myTypeName, String myAttributeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public VertexAttributeAlreadyExistsException(String myTypeName, String myAttributeName, Exception innerException = null) : base(innerException) { TypeName = myTypeName; AttributeName = myAttributeName; diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/VertexAttributeExistsInSubtypeException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/VertexAttributeExistsInSubtypeException.cs index b87ee8ac..3edd85e8 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/VertexAttributeExistsInSubtypeException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/VertexAttributeExistsInSubtypeException.cs @@ -34,7 +34,8 @@ public sealed class VertexAttributeExistsInSubtypeException : AGraphDBVertexAttr /// Creates a new VertexAttributeExistsInSubtypeException exception /// /// The name of the attribute - public VertexAttributeExistsInSubtypeException(String myAttributeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public VertexAttributeExistsInSubtypeException(String myAttributeName, Exception innerException = null) : base(innerException) { AttributeName = myAttributeName; _msg = String.Format("The attribute \"{0}\" already exists in subtype !", AttributeName); @@ -45,7 +46,8 @@ public VertexAttributeExistsInSubtypeException(String myAttributeName) /// /// The name of the attribute /// The name of the subtype - public VertexAttributeExistsInSubtypeException(String myAttributeName, String mySubtypeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public VertexAttributeExistsInSubtypeException(String myAttributeName, String mySubtypeName, Exception innerException = null) : base(innerException) { AttributeName = myAttributeName; SubtypeName = mySubtypeName; diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/VertexAttributeExistsInSuperVertexTypeException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/VertexAttributeExistsInSuperVertexTypeException.cs index e7aeafa3..ac7e015e 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/VertexAttributeExistsInSuperVertexTypeException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/VertexAttributeExistsInSuperVertexTypeException.cs @@ -40,7 +40,8 @@ public sealed class VertexAttributeExistsInSuperVertexTypeException : AGraphDBVe /// Creates a new VertexAttributeExistsInSuperVertexTypeException exception /// /// The name of the vertex attribute - public VertexAttributeExistsInSuperVertexTypeException(String myVertexAttributeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public VertexAttributeExistsInSuperVertexTypeException(String myVertexAttributeName, Exception innerException = null) : base(innerException) { VertexAttributeName = myVertexAttributeName; } @@ -50,7 +51,8 @@ public VertexAttributeExistsInSuperVertexTypeException(String myVertexAttributeN /// /// The name of the vertex attribute /// The name of the vertex supertype - public VertexAttributeExistsInSuperVertexTypeException(String myVertexAttributeName, String myVertexSupertypeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public VertexAttributeExistsInSuperVertexTypeException(String myVertexAttributeName, String myVertexSupertypeName, Exception innerException = null) : base(innerException) { VertexAttributeName = myVertexAttributeName; VertexSupertypeName = myVertexSupertypeName; diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/VertexAttributeIsNotDefinedException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/VertexAttributeIsNotDefinedException.cs index b2784087..033cc849 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/VertexAttributeIsNotDefinedException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeAttributeErrors/VertexAttributeIsNotDefinedException.cs @@ -34,7 +34,8 @@ public sealed class VertexAttributeIsNotDefinedException : AGraphDBVertexAttribu /// Creates a new VertexAttributeIsNotDefinedException exception /// /// The name of the attribute - public VertexAttributeIsNotDefinedException(String myAttributeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public VertexAttributeIsNotDefinedException(String myAttributeName, Exception innerException = null) : base(innerException) { AttributeName = myAttributeName; _msg = String.Format("The attribute \"{0}\" is not defined!", AttributeName); @@ -45,7 +46,8 @@ public VertexAttributeIsNotDefinedException(String myAttributeName) /// /// The name of the type /// The name of the attribute - public VertexAttributeIsNotDefinedException(String myTypeName, String myAttributeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public VertexAttributeIsNotDefinedException(String myTypeName, String myAttributeName, Exception innerException = null) : base(innerException) { TypeName = myTypeName; AttributeName = myAttributeName; diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/AGraphDBVertexTypeException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/AGraphDBVertexTypeException.cs index 1ee6b4bb..116d8580 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/AGraphDBVertexTypeException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/AGraphDBVertexTypeException.cs @@ -18,9 +18,17 @@ * */ +using System; + namespace sones.GraphDB.ErrorHandling { public abstract class AGraphDBVertexTypeException : AGraphDBException { + /// + /// Initializes a new instance of the AGraphDBVertexTypeException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AGraphDBVertexTypeException(Exception innerException = null) : base(innerException) + {} } } diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/InvalidBaseVertexTypeException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/InvalidBaseVertexTypeException.cs index f77d99c2..26a0b4b3 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/InvalidBaseVertexTypeException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/InvalidBaseVertexTypeException.cs @@ -33,7 +33,8 @@ public sealed class InvalidBaseVertexTypeException : AGraphDBVertexTypeException /// Creates a new InvalidBaseVertexTypeException exception /// /// The name of the base vertex type - public InvalidBaseVertexTypeException(String myBaseVertexTypeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidBaseVertexTypeException(String myBaseVertexTypeName, Exception innerException = null) : base(innerException) { BaseVertexTypeName = myBaseVertexTypeName; _msg = String.Format("The base vertex type [{0}] must be a user defined type.", BaseVertexTypeName); diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/InvalidVertexTypeException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/InvalidVertexTypeException.cs index 03020096..691a89d1 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/InvalidVertexTypeException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/InvalidVertexTypeException.cs @@ -35,7 +35,8 @@ public sealed class InvalidVertexTypeException : AGraphDBVertexTypeException /// /// The name of the invalid vertex type /// - public InvalidVertexTypeException(String myInvalidVertexType, String myInfo) : base() + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidVertexTypeException(String myInvalidVertexType, String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; InvalidVertexType = myInvalidVertexType; diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/ListAttributeNotAllowedException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/ListAttributeNotAllowedException.cs index 33f330b0..82af0bc8 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/ListAttributeNotAllowedException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/ListAttributeNotAllowedException.cs @@ -33,7 +33,8 @@ public sealed class ListAttributeNotAllowedException : AGraphDBVertexTypeExcepti /// Creates a new ListAttributeNotAllowedException exception /// /// The name of the vertex type - public ListAttributeNotAllowedException(String myVertexTypeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public ListAttributeNotAllowedException(String myVertexTypeName, Exception innerException = null) : base(innerException) { VertexTypeName = myVertexTypeName; _msg = String.Format("The user defined vertex type \\{0}\\ should not be used with LIST<> attributes, please use SET<> instead.", VertexTypeName); diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/ParentVertexTypeDoesNotExistException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/ParentVertexTypeDoesNotExistException.cs index 5498c284..c7acd9a7 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/ParentVertexTypeDoesNotExistException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/ParentVertexTypeDoesNotExistException.cs @@ -35,7 +35,8 @@ public sealed class ParentVertexTypeDoesNotExistException : AGraphDBVertexTypeEx /// /// The name of the parent type /// The current type - public ParentVertexTypeDoesNotExistException(String myParentVertexType, String myVertexType) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public ParentVertexTypeDoesNotExistException(String myParentVertexType, String myVertexType, Exception innerException = null) : base(innerException) { ParentType = myParentVertexType; Type = myVertexType; diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/TruncateNotAllowedOnInheritedTypeException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/TruncateNotAllowedOnInheritedTypeException.cs index 1885e5b6..c3ff8fc8 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/TruncateNotAllowedOnInheritedTypeException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/TruncateNotAllowedOnInheritedTypeException.cs @@ -33,7 +33,8 @@ public sealed class TruncateNotAllowedOnInheritedTypeException : AGraphDBVertexT /// Creates a new TruncateNotAllowedOnInheritedTypeException exception /// /// - public TruncateNotAllowedOnInheritedTypeException(String myVertexTypeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public TruncateNotAllowedOnInheritedTypeException(String myVertexTypeName, Exception innerException = null) : base(innerException) { VertexTypeName = myVertexTypeName; _msg = String.Format("Truncate on the inherited vertex type '{0}' is not allowed!", VertexTypeName); diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/UselessVertexTypeException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/UselessVertexTypeException.cs index b3410f3f..b0f7005b 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/UselessVertexTypeException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/UselessVertexTypeException.cs @@ -30,7 +30,12 @@ public class UselessVertexTypeException : AGraphDBVertexTypeException { private VertexTypePredefinition VertexType; - public UselessVertexTypeException(Request.VertexTypePredefinition predef) + /// + /// Initializes a new instance of the UselessVertexTypeException class. + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public UselessVertexTypeException(Request.VertexTypePredefinition predef, Exception innerException = null) : base(innerException) { this.VertexType = predef; _msg = string.Format("Vertex type [{0}] is marked sealed and abstract. This makes this type useless.", predef.VertexTypeName); diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/VertexTypeAlreadyExistException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/VertexTypeAlreadyExistException.cs index 3d108b74..2e4ae77b 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/VertexTypeAlreadyExistException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/VertexTypeAlreadyExistException.cs @@ -33,7 +33,8 @@ public sealed class VertexTypeAlreadyExistException : AGraphDBVertexTypeExceptio /// Creates a new VertexTypeAlreadyExistException exception /// /// The name of the vertex type - public VertexTypeAlreadyExistException(String myVertexTypeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public VertexTypeAlreadyExistException(String myVertexTypeName, Exception innerException = null) : base(innerException) { VertexTypeName = myVertexTypeName; _msg = String.Format("The vertex type {0} already exists", VertexTypeName); diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/VertexTypeDoesNotExistException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/VertexTypeDoesNotExistException.cs index 2f3fd7ce..cb43712e 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/VertexTypeDoesNotExistException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/VertexTypeDoesNotExistException.cs @@ -33,7 +33,8 @@ public sealed class VertexTypeDoesNotExistException : AGraphDBVertexTypeExceptio /// Creates a new VertexTypeDoesNotExistException exception /// /// The name of the vertex type - public VertexTypeDoesNotExistException(String myVertexTypeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public VertexTypeDoesNotExistException(String myVertexTypeName, Exception innerException = null) : base(innerException) { VertexTypeName = myVertexTypeName; _msg = String.Format("The vertex type {0} does not exists.", VertexTypeName); diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/VertexTypeDoesNotMatchException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/VertexTypeDoesNotMatchException.cs index ddf7d5ea..b6a8f540 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/VertexTypeDoesNotMatchException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/VertexTypeDoesNotMatchException.cs @@ -35,7 +35,8 @@ public sealed class VertexTypeDoesNotMatchException : AGraphDBVertexTypeExceptio /// /// The expected type /// The current type - public VertexTypeDoesNotMatchException(String myExpectedVertexType, String myCurrentVertexType) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public VertexTypeDoesNotMatchException(String myExpectedVertexType, String myCurrentVertexType, Exception innerException = null) : base(innerException) { ExpectedVertexType = myExpectedVertexType; CurrentVertexType = myCurrentVertexType; diff --git a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/VertexTypeRemoveException.cs b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/VertexTypeRemoveException.cs index 6279ad51..061a1ac5 100644 --- a/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/VertexTypeRemoveException.cs +++ b/GraphDB/IGraphDB/ErrorHandling/VertexTypeErrors/VertexTypeRemoveException.cs @@ -35,7 +35,8 @@ public sealed class VertexTypeRemoveException : AGraphDBException /// /// The expected type /// The current type - public VertexTypeRemoveException(String myVertexType, String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public VertexTypeRemoveException(String myVertexType, String myInfo, Exception innerException = null) : base(innerException) { VertexType = myVertexType; Info = myInfo; diff --git a/GraphDS/IGraphDS/ErrorHandling/AGraphDSException.cs b/GraphDS/IGraphDS/ErrorHandling/AGraphDSException.cs index 34c664f7..ba0d9926 100644 --- a/GraphDS/IGraphDS/ErrorHandling/AGraphDSException.cs +++ b/GraphDS/IGraphDS/ErrorHandling/AGraphDSException.cs @@ -19,6 +19,7 @@ */ using sones.Library.ErrorHandling; +using System; namespace sones.GraphDB.ErrorHandling { @@ -27,5 +28,21 @@ namespace sones.GraphDB.ErrorHandling /// public abstract class AGraphDSException : ASonesException { + /// + /// Initializes a new instance of the ASonesIndexException. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + protected AGraphDSException(Exception innerException = null) : this(null, innerException) + {} + + /// + /// Initializes a new instance of the ASonesIndexException using a specified message + /// + /// The message that describes the failure. + /// The exception that is the cause of the current exception, this parameter can be NULL. + protected AGraphDSException(String message, Exception innerException = null) : base(innerException) + { + _msg = message; + } } } \ No newline at end of file diff --git a/GraphDS/Server/Implementations/GraphDSServer/ErrorHandling/QueryLanguageNotFoundException.cs b/GraphDS/Server/Implementations/GraphDSServer/ErrorHandling/QueryLanguageNotFoundException.cs index 6ed9cd78..90df8f74 100644 --- a/GraphDS/Server/Implementations/GraphDSServer/ErrorHandling/QueryLanguageNotFoundException.cs +++ b/GraphDS/Server/Implementations/GraphDSServer/ErrorHandling/QueryLanguageNotFoundException.cs @@ -34,10 +34,10 @@ public class QueryLanguageNotFoundException : AGraphDSException /// /// The constructor for the exception. /// - /// The exception message. - public QueryLanguageNotFoundException(String myMessage) + /// The exception message, this parameter can be NULL. + /// The exception that is the cause of the current exception, this parameter can be NULL. + public QueryLanguageNotFoundException(String message, Exception innerException = null) : base(message, innerException) { - _msg = myMessage; } } } diff --git a/GraphDS/Server/Implementations/GraphDSServer/ErrorHandling/RESTServiceCouldNotStartetException.cs b/GraphDS/Server/Implementations/GraphDSServer/ErrorHandling/RESTServiceCouldNotStartetException.cs index 4282cd25..d5666aa3 100644 --- a/GraphDS/Server/Implementations/GraphDSServer/ErrorHandling/RESTServiceCouldNotStartetException.cs +++ b/GraphDS/Server/Implementations/GraphDSServer/ErrorHandling/RESTServiceCouldNotStartetException.cs @@ -34,10 +34,10 @@ public class RESTServiceCouldNotBeStartedException : AGraphDSException /// /// The constructor for the exception. /// - /// The exception message. - public RESTServiceCouldNotBeStartedException(String myMessage) + /// The exception message, this parameter can be NULL. + /// The exception that is the cause of the current exception, this parameter can be NULL. + public RESTServiceCouldNotBeStartedException(String message, Exception innerException = null) : base(message, innerException) { - _msg = myMessage; } } } diff --git a/GraphFS/IGraphFS/ErrorHandling/AGraphFSException.cs b/GraphFS/IGraphFS/ErrorHandling/AGraphFSException.cs index dddb7dbf..3f83fee1 100644 --- a/GraphFS/IGraphFS/ErrorHandling/AGraphFSException.cs +++ b/GraphFS/IGraphFS/ErrorHandling/AGraphFSException.cs @@ -35,6 +35,15 @@ protected AGraphFSException() : this(null, null) { } + /// + /// Initializes a new instance of the AGraphFSException using a specified inner exception. + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + protected AGraphFSException(Exception innerException) : this(null, innerException) + { + } + /// /// Initializes a new instance of the AGraphFSException using a specified message and inner exception. /// diff --git a/GraphFS/IGraphFS/ErrorHandling/CouldNotFindStructuredEdgePropertyException.cs b/GraphFS/IGraphFS/ErrorHandling/CouldNotFindStructuredEdgePropertyException.cs index 75bb4540..e7b76892 100644 --- a/GraphFS/IGraphFS/ErrorHandling/CouldNotFindStructuredEdgePropertyException.cs +++ b/GraphFS/IGraphFS/ErrorHandling/CouldNotFindStructuredEdgePropertyException.cs @@ -48,7 +48,8 @@ public sealed class CouldNotFindStructuredEdgePropertyException : AGraphFSExcept /// /// The edge type id /// The desired property of the edge - public CouldNotFindStructuredEdgePropertyException(Int64 myTypeID, Int64 myPropertyID) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public CouldNotFindStructuredEdgePropertyException(Int64 myTypeID, Int64 myPropertyID, Exception innerException = null) : base(innerException) { TypeID = myTypeID; PropertyID = myPropertyID; diff --git a/GraphFS/IGraphFS/ErrorHandling/CouldNotFindStructuredVertexPropertyException.cs b/GraphFS/IGraphFS/ErrorHandling/CouldNotFindStructuredVertexPropertyException.cs index 8a8dbd2f..ff724c9d 100644 --- a/GraphFS/IGraphFS/ErrorHandling/CouldNotFindStructuredVertexPropertyException.cs +++ b/GraphFS/IGraphFS/ErrorHandling/CouldNotFindStructuredVertexPropertyException.cs @@ -54,7 +54,8 @@ public sealed class CouldNotFindStructuredVertexPropertyException : AGraphFSExce /// The vertex type id /// The id of the vertex /// The desired property of the vertex - public CouldNotFindStructuredVertexPropertyException(Int64 myTypeID, Int64 myVertexID, Int64 myPropertyID) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public CouldNotFindStructuredVertexPropertyException(Int64 myTypeID, Int64 myVertexID, Int64 myPropertyID, Exception innerException = null) : base(innerException) { TypeID = myTypeID; VertexID = myVertexID; diff --git a/GraphFS/IGraphFS/ErrorHandling/CouldNotFindUnStructuredEdgePropertyException.cs b/GraphFS/IGraphFS/ErrorHandling/CouldNotFindUnStructuredEdgePropertyException.cs index 898a48f2..5b42ce2d 100644 --- a/GraphFS/IGraphFS/ErrorHandling/CouldNotFindUnStructuredEdgePropertyException.cs +++ b/GraphFS/IGraphFS/ErrorHandling/CouldNotFindUnStructuredEdgePropertyException.cs @@ -48,7 +48,8 @@ public sealed class CouldNotFindUnStructuredEdgePropertyException : AGraphFSExce /// /// The edge type id /// The desired property name of the edge - public CouldNotFindUnStructuredEdgePropertyException(Int64 myTypeID, String myPropertyName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public CouldNotFindUnStructuredEdgePropertyException(Int64 myTypeID, String myPropertyName, Exception innerException = null) : base(innerException) { TypeID = myTypeID; PropertyName = myPropertyName; diff --git a/GraphFS/IGraphFS/ErrorHandling/CouldNotFindUnStructuredVertexPropertyException.cs b/GraphFS/IGraphFS/ErrorHandling/CouldNotFindUnStructuredVertexPropertyException.cs index eace1a72..bb4adab8 100644 --- a/GraphFS/IGraphFS/ErrorHandling/CouldNotFindUnStructuredVertexPropertyException.cs +++ b/GraphFS/IGraphFS/ErrorHandling/CouldNotFindUnStructuredVertexPropertyException.cs @@ -54,7 +54,9 @@ public sealed class CouldNotFindUnStructuredVertexPropertyException : AGraphFSEx /// The vertex type id /// The id of the vertex /// The desired property of the vertex - public CouldNotFindUnStructuredVertexPropertyException(Int64 myTypeID, Int64 myVertexID, String myPropertyName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public CouldNotFindUnStructuredVertexPropertyException(Int64 myTypeID, Int64 myVertexID, String myPropertyName, Exception innerException = null) + : base(innerException) { TypeID = myTypeID; VertexID = myVertexID; diff --git a/GraphFS/IGraphFS/ErrorHandling/UnknownFSException.cs b/GraphFS/IGraphFS/ErrorHandling/UnknownFSException.cs index 842b3a75..962689f6 100644 --- a/GraphFS/IGraphFS/ErrorHandling/UnknownFSException.cs +++ b/GraphFS/IGraphFS/ErrorHandling/UnknownFSException.cs @@ -27,20 +27,15 @@ namespace sones.GraphFS.ErrorHandling /// public sealed class UnknownFSException : AGraphFSException { - /// - /// The exception that has been thrown - /// - public Exception ThrownException { get; private set; } - #region constructor /// - /// Creates a new UnknownFS exception + /// Initializes a new instance of the UnknownFSException class. /// - /// - public UnknownFSException(Exception e) + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public UnknownFSException(Exception innerException) : base("An unknown exception occured. See InnerException for details.", innerException) { - ThrownException = e; } #endregion diff --git a/GraphFS/IGraphFS/ErrorHandling/VertexAlreadyExistException.cs b/GraphFS/IGraphFS/ErrorHandling/VertexAlreadyExistException.cs index 25cee557..76ec0d88 100644 --- a/GraphFS/IGraphFS/ErrorHandling/VertexAlreadyExistException.cs +++ b/GraphFS/IGraphFS/ErrorHandling/VertexAlreadyExistException.cs @@ -48,7 +48,8 @@ public sealed class VertexAlreadyExistException : AGraphFSException /// /// The vertex type id of the vertex /// The id of the vertex - public VertexAlreadyExistException(Int64 myTypeID, Int64 myVertexID) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public VertexAlreadyExistException(Int64 myTypeID, Int64 myVertexID, Exception innerException = null) : base(innerException) { TypeID = myTypeID; VertexID = myVertexID; diff --git a/GraphFS/IGraphFS/ErrorHandling/VertexDoesNotExistException.cs b/GraphFS/IGraphFS/ErrorHandling/VertexDoesNotExistException.cs index 73413f6e..e798cc04 100644 --- a/GraphFS/IGraphFS/ErrorHandling/VertexDoesNotExistException.cs +++ b/GraphFS/IGraphFS/ErrorHandling/VertexDoesNotExistException.cs @@ -48,7 +48,8 @@ public sealed class VertexDoesNotExistException : AGraphFSException /// /// The vertex type id of the vertex /// The id of the vertex - public VertexDoesNotExistException(Int64 myTypeID, Int64 myVertexID) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public VertexDoesNotExistException(Int64 myTypeID, Int64 myVertexID, Exception innerException = null) : base(innerException) { TypeID = myTypeID; VertexID = myVertexID; diff --git a/GraphFS/IGraphFS/ErrorHandling/VertexTypeDoesNotExistException.cs b/GraphFS/IGraphFS/ErrorHandling/VertexTypeDoesNotExistException.cs index ede337a8..3d2db4e2 100644 --- a/GraphFS/IGraphFS/ErrorHandling/VertexTypeDoesNotExistException.cs +++ b/GraphFS/IGraphFS/ErrorHandling/VertexTypeDoesNotExistException.cs @@ -42,7 +42,8 @@ public sealed class VertexTypeDoesNotExistException : AGraphFSException /// Creates a new VertexTypeDoesNotExistException exception /// /// The vertex type id of the vertex - public VertexTypeDoesNotExistException(Int64 myTypeID) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public VertexTypeDoesNotExistException(Int64 myTypeID, Exception innerException = null) : base(innerException) { TypeID = myTypeID; _msg = String.Format("The vertex type with id {0} does not exist.", myTypeID); diff --git a/GraphQL/IGraphQL/ErrorHandling/AGraphQLException.cs b/GraphQL/IGraphQL/ErrorHandling/AGraphQLException.cs index 69052a15..e6eb13fe 100644 --- a/GraphQL/IGraphQL/ErrorHandling/AGraphQLException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/AGraphQLException.cs @@ -19,6 +19,7 @@ */ using sones.Library.ErrorHandling; +using System; namespace sones.GraphQL.ErrorHandling { @@ -27,5 +28,11 @@ namespace sones.GraphQL.ErrorHandling /// public abstract class AGraphQLException : ASonesException { + /// + /// Initializes a new instance of the AGraphQLException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AGraphQLException(Exception innerException = null) : base(innerException) + {} } } \ No newline at end of file diff --git a/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/ASonesQLAggregateException.cs b/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/ASonesQLAggregateException.cs index 28d58cf2..71635187 100644 --- a/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/ASonesQLAggregateException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/ASonesQLAggregateException.cs @@ -19,10 +19,17 @@ */ using sones.Library.ErrorHandling; +using System; namespace sones.GraphQL.ErrorHandling { - public class ASonesQLAggregateException : ASonesException + public abstract class ASonesQLAggregateException : ASonesException { + /// + /// Initializes a new isntance of the ASonesQLAggregateException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public ASonesQLAggregateException(Exception innerException = null) : base(innerException) + {} } } diff --git a/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateDoesNotMatchGroupLevelException.cs b/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateDoesNotMatchGroupLevelException.cs index 80a924fb..8ba875d0 100644 --- a/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateDoesNotMatchGroupLevelException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateDoesNotMatchGroupLevelException.cs @@ -39,7 +39,8 @@ public sealed class AggregateDoesNotMatchGroupLevelException : ASonesQLAggregate /// Creates a new AggregateDoesNotMatchGroupLevelException exception /// /// - public AggregateDoesNotMatchGroupLevelException(String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AggregateDoesNotMatchGroupLevelException(String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; _msg = Info; diff --git a/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateIsNotValidOnThisAttributeException.cs b/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateIsNotValidOnThisAttributeException.cs index 66bb13f8..1ee2e28c 100644 --- a/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateIsNotValidOnThisAttributeException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateIsNotValidOnThisAttributeException.cs @@ -33,7 +33,8 @@ public sealed class AggregateIsNotValidOnThisAttributeException : ASonesQLAggreg /// Creates a new AggregateIsNotValidOnThisAttributeException exception /// /// - public AggregateIsNotValidOnThisAttributeException(String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AggregateIsNotValidOnThisAttributeException(String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; _msg = Info; diff --git a/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateNotAllowedException.cs b/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateNotAllowedException.cs index 638f539e..c1da4584 100644 --- a/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateNotAllowedException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateNotAllowedException.cs @@ -33,7 +33,8 @@ public class AggregateNotAllowedException : ASonesQLAggregateException /// Creates a new AggregateNotAllowedException exception /// /// The aggregate node - public AggregateNotAllowedException(String myAggregateNode) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AggregateNotAllowedException(String myAggregateNode, Exception innerException = null) : base(innerException) { Aggregate = myAggregateNode; _msg = String.Format("The aggregate \"{0}\" is not allowed in this context!", Aggregate); diff --git a/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateOnMultiAttributesNotAllowedException.cs b/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateOnMultiAttributesNotAllowedException.cs index 3233a7f9..4c848785 100644 --- a/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateOnMultiAttributesNotAllowedException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateOnMultiAttributesNotAllowedException.cs @@ -29,7 +29,12 @@ public sealed class AggregateOnMultiAttributesNotAllowedException : ASonesQLAggr { public String Info { get; private set; } - public AggregateOnMultiAttributesNotAllowedException(String myInfo) + /// + /// Initializes a new instance of the AggregateOnMultiAttributesNotAllowedException class. + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AggregateOnMultiAttributesNotAllowedException(String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; _msg = Info; diff --git a/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateParameterCountMismatchException.cs b/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateParameterCountMismatchException.cs index 75c01f95..0afd1b67 100644 --- a/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateParameterCountMismatchException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/AggregateParameterCountMismatchException.cs @@ -38,7 +38,9 @@ public sealed class AggregateParameterCountMismatchException : ASonesQLAggregate /// The used aggregate /// The expected count of parameters /// The current count of parameters - public AggregateParameterCountMismatchException(String myAggregate, Int32 myExpectedParameterCount, Int32 myCurrentParameterCount) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AggregateParameterCountMismatchException(String myAggregate, Int32 myExpectedParameterCount, Int32 myCurrentParameterCount, Exception innerException = null) + : base(innerException) { ExpectedParameterCount = myExpectedParameterCount; CurrentParameterCount = myCurrentParameterCount; @@ -55,7 +57,9 @@ public AggregateParameterCountMismatchException(String myAggregate, Int32 myExpe /// /// The expected count of parameters /// The current count of parameters - public AggregateParameterCountMismatchException(Int32 myExpectedParameterCount, Int32 myCurrentParameterCount) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AggregateParameterCountMismatchException(Int32 myExpectedParameterCount, Int32 myCurrentParameterCount, Exception innerException = null) + : base(innerException) { ExpectedParameterCount = myExpectedParameterCount; CurrentParameterCount = myCurrentParameterCount; diff --git a/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/NotImplementedAggregateTargetException.cs b/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/NotImplementedAggregateTargetException.cs index b1bec64a..3da074f6 100644 --- a/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/NotImplementedAggregateTargetException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/NotImplementedAggregateTargetException.cs @@ -33,7 +33,8 @@ public sealed class NotImplementedAggregateTargetException : ASonesQLAggregateEx /// Creates a new NotImplementedAggregateTargetException exception /// /// - public NotImplementedAggregateTargetException(Type myAggregateTarget) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public NotImplementedAggregateTargetException(Type myAggregateTarget, Exception innerException = null) : base(innerException) { AggregateTarget = myAggregateTarget; _msg = String.Format("Currently the type {0} is not implemented for aggregates.", AggregateTarget.Name); diff --git a/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/UnknownAggregateException.cs b/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/UnknownAggregateException.cs index 92ad7f7d..1d0dbf9d 100644 --- a/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/UnknownAggregateException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/AggregateErrors/UnknownAggregateException.cs @@ -27,20 +27,14 @@ namespace sones.GraphQL.ErrorHandling /// public sealed class UnknownAggregateException : ASonesQLAggregateException { - /// - /// The exception that has been thrown - /// - public Exception ThrownException { get; private set; } - #region constructor /// /// Creates a new UnknownAggregateException exception /// - /// - public UnknownAggregateException(Exception e) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public UnknownAggregateException(Exception innerException = null) : base(innerException) { - ThrownException = e; _msg = "An unknown aggregate error has occurred."; } diff --git a/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/AGraphQLAttributeAssignmentException.cs b/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/AGraphQLAttributeAssignmentException.cs index 004878b4..6c7a61b4 100644 --- a/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/AGraphQLAttributeAssignmentException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/AGraphQLAttributeAssignmentException.cs @@ -18,9 +18,17 @@ * */ +using System; + namespace sones.GraphQL.ErrorHandling { public abstract class AGraphQLAttributeAssignmentException : AGraphQLException { + /// + /// Initializes a new instance of the AGraphQLAttributeAssignmentException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AGraphQLAttributeAssignmentException(Exception innerException = null) : base(innerException) + {} } } diff --git a/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/InvalidAssignOfSetException.cs b/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/InvalidAssignOfSetException.cs index 713540e5..82d993db 100644 --- a/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/InvalidAssignOfSetException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/InvalidAssignOfSetException.cs @@ -33,7 +33,8 @@ public sealed class InvalidAssignOfSetException : AGraphQLAttributeAssignmentExc /// Creates a new InvalidAssignOfSetException exception /// /// - public InvalidAssignOfSetException(String myAttributeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidAssignOfSetException(String myAttributeName, Exception innerException = null) : base(innerException) { AttributeName = myAttributeName; _msg = String.Format("Assignment of the reference type {0} with a list is not allowed. Use SETOF or REF (REFERENCE) instead.", AttributeName); diff --git a/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/InvalidAttrDefaultValueAssignmentException.cs b/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/InvalidAttrDefaultValueAssignmentException.cs index 9103756c..414ca39c 100644 --- a/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/InvalidAttrDefaultValueAssignmentException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/InvalidAttrDefaultValueAssignmentException.cs @@ -43,7 +43,9 @@ public sealed class InvalidAttrDefaultValueAssignmentException : AGraphQLAttribu /// The attribute name /// The type of the attribute /// The expected type of the attribute - public InvalidAttrDefaultValueAssignmentException(String myAttributeName, String myAttrType, String myExpectedType) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidAttrDefaultValueAssignmentException(String myAttributeName, String myAttrType, String myExpectedType, Exception innerException = null) + : base(innerException) { AttributeName = myAttributeName; AttributeType = myAttrType; @@ -56,14 +58,20 @@ public InvalidAttrDefaultValueAssignmentException(String myAttributeName, String /// /// The type of the attribute /// The expected type of the attribute - public InvalidAttrDefaultValueAssignmentException(String myAttrType, String myExpectedType) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidAttrDefaultValueAssignmentException(String myAttrType, String myExpectedType, Exception innerException = null) : base(innerException) { AttributeType = myAttrType; ExpectedType = myExpectedType; _msg = String.Format("Invalid type assignment for default value. Current type is \"{0}\". The type \"{1}\" is expected.", AttributeType, ExpectedType); } - public InvalidAttrDefaultValueAssignmentException(String myInfo) + /// + /// Initializes a new instance of the InvalidAttrDefaultValueAssignmentException class. + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidAttrDefaultValueAssignmentException(String myInfo, Exception innerException = null) : base(innerException) { AttributeName = null; AttributeType = null; diff --git a/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/InvalidReferenceAssignmentOfUndefAttrException.cs b/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/InvalidReferenceAssignmentOfUndefAttrException.cs index b6ffdda0..509da67f 100644 --- a/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/InvalidReferenceAssignmentOfUndefAttrException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/InvalidReferenceAssignmentOfUndefAttrException.cs @@ -18,6 +18,8 @@ * */ +using System; + namespace sones.GraphQL.ErrorHandling { /// @@ -28,7 +30,8 @@ public sealed class InvalidReferenceAssignmentOfUndefAttrException : AGraphQLAtt /// /// Creates a new InvalidReferenceAssignmentOfUndefAttrException exception /// - public InvalidReferenceAssignmentOfUndefAttrException() + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidReferenceAssignmentOfUndefAttrException(Exception innerException = null) : base(innerException) { _msg = "An reference assignment for undefined attributes is not allowed."; } diff --git a/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/InvalidUndefAttrTypeException.cs b/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/InvalidUndefAttrTypeException.cs index 19fe54f9..7021b2d9 100644 --- a/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/InvalidUndefAttrTypeException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/InvalidUndefAttrTypeException.cs @@ -35,7 +35,8 @@ public sealed class InvalidUndefAttrTypeException : AGraphQLAttributeAssignmentE /// /// The undefined attribute /// The target attribute type - public InvalidUndefAttrTypeException(String myUndefAttribute, String myAttributeType) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidUndefAttrTypeException(String myUndefAttribute, String myAttributeType, Exception innerException = null) : base(innerException) { Attribute = myUndefAttribute; AttributeType = myAttributeType; diff --git a/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/ReferenceAssignmentEmptyValueException.cs b/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/ReferenceAssignmentEmptyValueException.cs index e54b9565..38d6511d 100644 --- a/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/ReferenceAssignmentEmptyValueException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/ReferenceAssignmentEmptyValueException.cs @@ -33,7 +33,8 @@ public sealed class ReferenceAssignmentEmptyValueException : AGraphQLAttributeAs /// Creates a new ReferenceAssignmentEmptyValueException exception /// /// The name of the attribute - public ReferenceAssignmentEmptyValueException(String myAttributeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public ReferenceAssignmentEmptyValueException(String myAttributeName, Exception innerException = null) : base(innerException) { AttributeName = myAttributeName; _msg = String.Format("The single reference attribute {0} does not contain any value.", AttributeName); diff --git a/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/ReferenceAssignmentException.cs b/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/ReferenceAssignmentException.cs index aaa63b07..f79b902e 100644 --- a/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/ReferenceAssignmentException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/ReferenceAssignmentException.cs @@ -33,7 +33,8 @@ public sealed class ReferenceAssignmentException : AGraphQLAttributeAssignmentEx /// Creates a new ReferenceAssignmentException exception /// /// Variable for additional infos - public ReferenceAssignmentException(String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public ReferenceAssignmentException(String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; _msg = Info; diff --git a/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/ReferenceAssignmentExpectedException.cs b/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/ReferenceAssignmentExpectedException.cs index b2dcf245..fc9a0650 100644 --- a/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/ReferenceAssignmentExpectedException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/AttributeAssignmentErrors/ReferenceAssignmentExpectedException.cs @@ -30,7 +30,8 @@ public sealed class ReferenceAssignmentExpectedException : AGraphQLAttributeAssi /// /// Creates a new ReferenceAssignmentExpectedException exception /// - public ReferenceAssignmentExpectedException(String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public ReferenceAssignmentExpectedException(String myInfo, Exception innerException = null) : base(innerException) { _msg = myInfo; } diff --git a/GraphQL/IGraphQL/ErrorHandling/DataTypeDoesNotMatchException.cs b/GraphQL/IGraphQL/ErrorHandling/DataTypeDoesNotMatchException.cs index a3337b72..6c952370 100644 --- a/GraphQL/IGraphQL/ErrorHandling/DataTypeDoesNotMatchException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/DataTypeDoesNotMatchException.cs @@ -35,7 +35,8 @@ public sealed class DataTypeDoesNotMatchException : AGraphQLException /// /// The expected data type /// The current data type - public DataTypeDoesNotMatchException(String myExpectedDataType, String myDataType) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public DataTypeDoesNotMatchException(String myExpectedDataType, String myDataType, Exception innerException = null) : base(innerException) { ExpectedDataType = myExpectedDataType; DataType = myDataType; diff --git a/GraphQL/IGraphQL/ErrorHandling/DumpErrors/AGraphQLDumpException.cs b/GraphQL/IGraphQL/ErrorHandling/DumpErrors/AGraphQLDumpException.cs index e5fd7a17..2311ba0f 100644 --- a/GraphQL/IGraphQL/ErrorHandling/DumpErrors/AGraphQLDumpException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/DumpErrors/AGraphQLDumpException.cs @@ -18,9 +18,17 @@ * */ +using System; + namespace sones.GraphQL.ErrorHandling { public abstract class AGraphQLDumpException : AGraphQLException - { + { + /// + /// Initializes a new instance of the AGraphQLDumpException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AGraphQLDumpException(Exception innerException = null) : base(innerException) + {} } } diff --git a/GraphQL/IGraphQL/ErrorHandling/DumpErrors/InvalidDumpFormatException.cs b/GraphQL/IGraphQL/ErrorHandling/DumpErrors/InvalidDumpFormatException.cs index 9d1ad48b..3f71278b 100644 --- a/GraphQL/IGraphQL/ErrorHandling/DumpErrors/InvalidDumpFormatException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/DumpErrors/InvalidDumpFormatException.cs @@ -33,7 +33,8 @@ public sealed class InvalidDumpFormatException : AGraphQLDumpException /// Creates a new InvalidDumpFormatException exception /// /// - public InvalidDumpFormatException(String dumpFormat) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidDumpFormatException(String dumpFormat, Exception innerException = null) : base(innerException) { DumpFormat = dumpFormat; _msg = DumpFormat; diff --git a/GraphQL/IGraphQL/ErrorHandling/DumpErrors/InvalidDumpTypeException.cs b/GraphQL/IGraphQL/ErrorHandling/DumpErrors/InvalidDumpTypeException.cs index 63e3e65e..644c5bf1 100644 --- a/GraphQL/IGraphQL/ErrorHandling/DumpErrors/InvalidDumpTypeException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/DumpErrors/InvalidDumpTypeException.cs @@ -33,7 +33,8 @@ public sealed class InvalidDumpTypeException : AGraphQLDumpException /// Creates a new InvalidDumpTypeException exception /// /// - public InvalidDumpTypeException(String dumpType) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidDumpTypeException(String dumpType, Exception innerException = null) : base(innerException) { DumpType = dumpType; _msg = DumpType; diff --git a/GraphQL/IGraphQL/ErrorHandling/DumpErrors/NotADumpableGrammarException.cs b/GraphQL/IGraphQL/ErrorHandling/DumpErrors/NotADumpableGrammarException.cs index 1a1ca21c..b47b0c43 100644 --- a/GraphQL/IGraphQL/ErrorHandling/DumpErrors/NotADumpableGrammarException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/DumpErrors/NotADumpableGrammarException.cs @@ -33,11 +33,11 @@ public sealed class NotADumpableGrammarException : AGraphQLDumpException /// Create a new NotADumpableGrammarException exception /// /// - public NotADumpableGrammarException(String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public NotADumpableGrammarException(String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; _msg = Info; - } - + } } } diff --git a/GraphQL/IGraphQL/ErrorHandling/DuplicateReferenceOccurrenceException.cs b/GraphQL/IGraphQL/ErrorHandling/DuplicateReferenceOccurrenceException.cs index cec4edf0..1f4013db 100644 --- a/GraphQL/IGraphQL/ErrorHandling/DuplicateReferenceOccurrenceException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/DuplicateReferenceOccurrenceException.cs @@ -33,7 +33,8 @@ public sealed class DuplicateReferenceOccurrenceException : AGraphQLException /// Creates a new DuplicateReferenceOccurrenceException exception /// /// The name of the type - public DuplicateReferenceOccurrenceException(String myTypeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public DuplicateReferenceOccurrenceException(String myTypeName, Exception innerException = null) : base(innerException) { TypeName = myTypeName; _msg = String.Format("There is already a reference for type \"{0}\"!", TypeName); diff --git a/GraphQL/IGraphQL/ErrorHandling/EdgeErrors/AGraphQLEdgeException.cs b/GraphQL/IGraphQL/ErrorHandling/EdgeErrors/AGraphQLEdgeException.cs index 05c84839..becf61ca 100644 --- a/GraphQL/IGraphQL/ErrorHandling/EdgeErrors/AGraphQLEdgeException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/EdgeErrors/AGraphQLEdgeException.cs @@ -18,9 +18,16 @@ * */ +using System; namespace sones.GraphQL.ErrorHandling { public abstract class AGraphQLEdgeException : AGraphQLException { + /// + /// Initializes a new instance of the AGraphQLEdgeException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AGraphQLEdgeException(Exception innerException = null) : base(innerException) + {} } } diff --git a/GraphQL/IGraphQL/ErrorHandling/EdgeErrors/EdgeParameterCountMismatchException.cs b/GraphQL/IGraphQL/ErrorHandling/EdgeErrors/EdgeParameterCountMismatchException.cs index d48ef9b0..c61d5322 100644 --- a/GraphQL/IGraphQL/ErrorHandling/EdgeErrors/EdgeParameterCountMismatchException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/EdgeErrors/EdgeParameterCountMismatchException.cs @@ -37,7 +37,9 @@ public sealed class EdgeParameterCountMismatchException : AGraphQLEdgeException /// The IncomingEdge /// The current count of parameters /// The expected count of parameters - public EdgeParameterCountMismatchException(String edge, UInt32 currentNumOfParams, UInt32 expectedNumOfParams) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public EdgeParameterCountMismatchException(String edge, UInt32 currentNumOfParams, UInt32 expectedNumOfParams, Exception innerException = null) + : base(innerException) { Edge = edge; CurrentNumOfParams = currentNumOfParams; diff --git a/GraphQL/IGraphQL/ErrorHandling/EdgeErrors/TooManyElementsForEdgeException.cs b/GraphQL/IGraphQL/ErrorHandling/EdgeErrors/TooManyElementsForEdgeException.cs index 103b660e..c229006b 100644 --- a/GraphQL/IGraphQL/ErrorHandling/EdgeErrors/TooManyElementsForEdgeException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/EdgeErrors/TooManyElementsForEdgeException.cs @@ -35,7 +35,8 @@ public sealed class TooManyElementsForEdgeException : AGraphQLEdgeException /// /// The name of the IncomingEdge type /// The current count of elements - public TooManyElementsForEdgeException(String edgeTypeName, UInt64 currentElements) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public TooManyElementsForEdgeException(String edgeTypeName, UInt64 currentElements, Exception innerException = null) : base(innerException) { CurrentElements = currentElements; EdgeTypeName = edgeTypeName; diff --git a/GraphQL/IGraphQL/ErrorHandling/FunctionErrors/AGraphQLFunctionException.cs b/GraphQL/IGraphQL/ErrorHandling/FunctionErrors/AGraphQLFunctionException.cs index 1b11cd5c..75e763fb 100644 --- a/GraphQL/IGraphQL/ErrorHandling/FunctionErrors/AGraphQLFunctionException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/FunctionErrors/AGraphQLFunctionException.cs @@ -18,9 +18,17 @@ * */ +using System; + namespace sones.GraphQL.ErrorHandling { public abstract class AGraphQLFunctionException : AGraphQLException - { + { + /// + /// Initializes a new instance of the AGraphQLFunctionException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AGraphQLFunctionException(Exception innerException = null) : base(innerException) + {} } } diff --git a/GraphQL/IGraphQL/ErrorHandling/FunctionErrors/FunctionDoesNotExistException.cs b/GraphQL/IGraphQL/ErrorHandling/FunctionErrors/FunctionDoesNotExistException.cs index 35e491c5..def2c280 100644 --- a/GraphQL/IGraphQL/ErrorHandling/FunctionErrors/FunctionDoesNotExistException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/FunctionErrors/FunctionDoesNotExistException.cs @@ -33,7 +33,8 @@ public sealed class FunctionDoesNotExistException : AGraphQLFunctionException /// Creates a new FunctionDoesNotExistException exception /// /// The name of the function - public FunctionDoesNotExistException(String myFunctionName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public FunctionDoesNotExistException(String myFunctionName, Exception innerException = null) : base(innerException) { FunctionName = myFunctionName; _msg = String.Format("The function \"{0}\" does not exist!", FunctionName); diff --git a/GraphQL/IGraphQL/ErrorHandling/FunctionErrors/FunctionParameterInvalidReferenceException.cs b/GraphQL/IGraphQL/ErrorHandling/FunctionErrors/FunctionParameterInvalidReferenceException.cs index f208c8a7..f5a40137 100644 --- a/GraphQL/IGraphQL/ErrorHandling/FunctionErrors/FunctionParameterInvalidReferenceException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/FunctionErrors/FunctionParameterInvalidReferenceException.cs @@ -33,7 +33,8 @@ public sealed class FunctionParameterInvalidReferenceException : AGraphQLFunctio /// Creates a new FunctionParameterInvalidReferenceException exception /// /// - public FunctionParameterInvalidReferenceException(String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public FunctionParameterInvalidReferenceException(String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; _msg = String.Format("An invalid reference for a function parameter: {0}! ", Info); diff --git a/GraphQL/IGraphQL/ErrorHandling/FunctionErrors/InvalidFunctionBaseException.cs b/GraphQL/IGraphQL/ErrorHandling/FunctionErrors/InvalidFunctionBaseException.cs index 595a5911..f0e4e878 100644 --- a/GraphQL/IGraphQL/ErrorHandling/FunctionErrors/InvalidFunctionBaseException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/FunctionErrors/InvalidFunctionBaseException.cs @@ -35,7 +35,8 @@ public sealed class InvalidFunctionBaseException : AGraphQLFunctionException /// /// /// - public InvalidFunctionBaseException(String myTypeAttribute, String myFunctionName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidFunctionBaseException(String myTypeAttribute, String myFunctionName, Exception innerException = null) : base(innerException) { TypeAttribute = myTypeAttribute; FunctionName = myFunctionName; diff --git a/GraphQL/IGraphQL/ErrorHandling/IndexErrors/AGraphQLIndexException.cs b/GraphQL/IGraphQL/ErrorHandling/IndexErrors/AGraphQLIndexException.cs index 47a9883b..3033ecfc 100644 --- a/GraphQL/IGraphQL/ErrorHandling/IndexErrors/AGraphQLIndexException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/IndexErrors/AGraphQLIndexException.cs @@ -18,9 +18,17 @@ * */ +using System; + namespace sones.GraphQL.ErrorHandling { public abstract class AGraphQLIndexException : AGraphQLException { + /// + /// Initializes a new istance of the AGraphQLIndexException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AGraphQLIndexException(Exception innerException = null) : base(innerException) + {} } } diff --git a/GraphQL/IGraphQL/ErrorHandling/IndexErrors/CouldNotAlterIndexOnTypeException.cs b/GraphQL/IGraphQL/ErrorHandling/IndexErrors/CouldNotAlterIndexOnTypeException.cs index 262d6dd3..17a697de 100644 --- a/GraphQL/IGraphQL/ErrorHandling/IndexErrors/CouldNotAlterIndexOnTypeException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/IndexErrors/CouldNotAlterIndexOnTypeException.cs @@ -33,7 +33,8 @@ public sealed class CouldNotAlterIndexOnTypeException : AGraphQLIndexException /// Creates a new CouldNotAlterIndexOnTypeException exception /// /// - public CouldNotAlterIndexOnTypeException(String myIndexType) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public CouldNotAlterIndexOnTypeException(String myIndexType, Exception innerException = null) : base(innerException) { IndexType = myIndexType; _msg = String.Format("Could not alter index on type \"{0}\".", IndexType); diff --git a/GraphQL/IGraphQL/ErrorHandling/IndexErrors/InvalidIndexOperationException.cs b/GraphQL/IGraphQL/ErrorHandling/IndexErrors/InvalidIndexOperationException.cs index 6a5d5c9d..856c613c 100644 --- a/GraphQL/IGraphQL/ErrorHandling/IndexErrors/InvalidIndexOperationException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/IndexErrors/InvalidIndexOperationException.cs @@ -43,7 +43,8 @@ public sealed class InvalidIndexOperationException : AGraphQLIndexException /// /// The name of the index /// The name of the operation - public InvalidIndexOperationException(String myIndexName, String myOperationName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidIndexOperationException(String myIndexName, String myOperationName, Exception innerException = null) : base(innerException) { IndexName = myIndexName; OperationName = myOperationName; diff --git a/GraphQL/IGraphQL/ErrorHandling/InvalidIDNodeException.cs b/GraphQL/IGraphQL/ErrorHandling/InvalidIDNodeException.cs index d1f3317b..0824ffa0 100644 --- a/GraphQL/IGraphQL/ErrorHandling/InvalidIDNodeException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/InvalidIDNodeException.cs @@ -33,7 +33,8 @@ public sealed class InvalidIDNodeException : AGraphQLException /// Creates a new InvalidIDNodeException exception /// /// - public InvalidIDNodeException(String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidIDNodeException(String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; _msg = String.Format("The IDNode is not valid: \"{0}\"", Info); diff --git a/GraphQL/IGraphQL/ErrorHandling/InvalidTupleException.cs b/GraphQL/IGraphQL/ErrorHandling/InvalidTupleException.cs index 842cad24..7081d1d7 100644 --- a/GraphQL/IGraphQL/ErrorHandling/InvalidTupleException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/InvalidTupleException.cs @@ -33,7 +33,8 @@ public sealed class InvalidTupleException : AGraphQLException /// Creates a new InvalidTupleException exception /// /// - public InvalidTupleException(String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidTupleException(String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; _msg = String.Format("The tuple is not valid: {0}", Info); diff --git a/GraphQL/IGraphQL/ErrorHandling/NotImpementedExpressionNodeException.cs b/GraphQL/IGraphQL/ErrorHandling/NotImpementedExpressionNodeException.cs index 814a1f35..ec2b5dd6 100644 --- a/GraphQL/IGraphQL/ErrorHandling/NotImpementedExpressionNodeException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/NotImpementedExpressionNodeException.cs @@ -33,7 +33,8 @@ public sealed class NotImpementedExpressionNodeException : AGraphQLException /// Creates a new NotImpementedExpressionNodeException exception /// /// The current node type - public NotImpementedExpressionNodeException(Type myNodeType) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public NotImpementedExpressionNodeException(Type myNodeType, Exception innerException = null) : base(innerException) { NodeType = myNodeType; _msg = String.Format("Currently the type {0} has not been implemented for expressions.", NodeType.Name); diff --git a/GraphQL/IGraphQL/ErrorHandling/NotImplementedQLException.cs b/GraphQL/IGraphQL/ErrorHandling/NotImplementedQLException.cs index 7c777c51..420d5cdd 100644 --- a/GraphQL/IGraphQL/ErrorHandling/NotImplementedQLException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/NotImplementedQLException.cs @@ -29,16 +29,14 @@ namespace sones.GraphQL.ErrorHandling /// public class NotImplementedQLException : AGraphQLException { - public String Message { get; protected set; } - /// /// Creates a new NotImplementedException exception /// /// The given message - public NotImplementedQLException(String myMessage) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public NotImplementedQLException(String message, Exception innerException = null) : base(innerException) { - Message = myMessage; - _msg = myMessage; + _msg = message; } } diff --git a/GraphQL/IGraphQL/ErrorHandling/OperatorErrors/AGraphQLOperatorException.cs b/GraphQL/IGraphQL/ErrorHandling/OperatorErrors/AGraphQLOperatorException.cs index 44d713c6..7d92499f 100644 --- a/GraphQL/IGraphQL/ErrorHandling/OperatorErrors/AGraphQLOperatorException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/OperatorErrors/AGraphQLOperatorException.cs @@ -18,9 +18,16 @@ * */ +using System; namespace sones.GraphQL.ErrorHandling { public abstract class AGraphQLOperatorException : AGraphQLException { + /// + /// Initializes a new instance of the AGraphQLOperatorException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AGraphQLOperatorException(Exception innerException = null) : base(innerException) + {} } } diff --git a/GraphQL/IGraphQL/ErrorHandling/OperatorErrors/InvalidInRangeIntervalException.cs b/GraphQL/IGraphQL/ErrorHandling/OperatorErrors/InvalidInRangeIntervalException.cs index c5046dab..aa033c28 100644 --- a/GraphQL/IGraphQL/ErrorHandling/OperatorErrors/InvalidInRangeIntervalException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/OperatorErrors/InvalidInRangeIntervalException.cs @@ -35,7 +35,8 @@ public sealed class InvalidInRangeIntervalException : AGraphQLOperatorException /// /// The expected value /// The current value - public InvalidInRangeIntervalException(Int32 expected, Int32 current) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidInRangeIntervalException(Int32 expected, Int32 current, Exception innerException = null) : base(innerException) { Expected = expected; Current = current; diff --git a/GraphQL/IGraphQL/ErrorHandling/OperatorErrors/InvalidInRangeOperationException.cs b/GraphQL/IGraphQL/ErrorHandling/OperatorErrors/InvalidInRangeOperationException.cs index 08c4f843..dcc41e67 100644 --- a/GraphQL/IGraphQL/ErrorHandling/OperatorErrors/InvalidInRangeOperationException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/OperatorErrors/InvalidInRangeOperationException.cs @@ -33,7 +33,8 @@ public sealed class InvalidInRangeOperationException : AGraphQLOperatorException /// Creates a new InvalidInRangeIntervalException exception /// /// - public InvalidInRangeOperationException(String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidInRangeOperationException(String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; _msg = Info; diff --git a/GraphQL/IGraphQL/ErrorHandling/OperatorErrors/OperatorDoesNotExistException.cs b/GraphQL/IGraphQL/ErrorHandling/OperatorErrors/OperatorDoesNotExistException.cs index ce1d957a..d176d33f 100644 --- a/GraphQL/IGraphQL/ErrorHandling/OperatorErrors/OperatorDoesNotExistException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/OperatorErrors/OperatorDoesNotExistException.cs @@ -33,7 +33,8 @@ public sealed class OperatorDoesNotExistException : AGraphQLOperatorException /// Creates a new OperatorDoesNotExistException exception /// /// - public OperatorDoesNotExistException(String myOperator) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public OperatorDoesNotExistException(String myOperator, Exception innerException = null) : base(innerException) { Operator = myOperator; _msg = String.Format("The operator {0} does not exist.", Operator); diff --git a/GraphQL/IGraphQL/ErrorHandling/Replace/ReplaceException.cs b/GraphQL/IGraphQL/ErrorHandling/Replace/ReplaceException.cs index 7374e3b0..b599fcea 100644 --- a/GraphQL/IGraphQL/ErrorHandling/Replace/ReplaceException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/Replace/ReplaceException.cs @@ -24,7 +24,12 @@ namespace sones.GraphQL.ErrorHandling { public sealed class ReplaceException : AGraphQLException { - public ReplaceException(String myInfo) + /// + /// Initializes a new instance of the ReplaceException class. + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public ReplaceException(String myInfo, Exception innerException = null) : base(innerException) { _msg = myInfo; } diff --git a/GraphQL/IGraphQL/ErrorHandling/SelectErrors/AGraphQLSelectException.cs b/GraphQL/IGraphQL/ErrorHandling/SelectErrors/AGraphQLSelectException.cs index 50953115..537cc050 100644 --- a/GraphQL/IGraphQL/ErrorHandling/SelectErrors/AGraphQLSelectException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/SelectErrors/AGraphQLSelectException.cs @@ -18,9 +18,17 @@ * */ +using System; + namespace sones.GraphQL.ErrorHandling { public abstract class AGraphQLSelectException : AGraphQLException { + /// + /// Initializes a new instance of the AGraphQLSelectException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AGraphQLSelectException(Exception innerException = null) : base(innerException) + {} } } diff --git a/GraphQL/IGraphQL/ErrorHandling/SelectErrors/DuplicateAttributeSelectionException.cs b/GraphQL/IGraphQL/ErrorHandling/SelectErrors/DuplicateAttributeSelectionException.cs index e62204ea..3ab5bba0 100644 --- a/GraphQL/IGraphQL/ErrorHandling/SelectErrors/DuplicateAttributeSelectionException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/SelectErrors/DuplicateAttributeSelectionException.cs @@ -33,7 +33,8 @@ public sealed class DuplicateAttributeSelectionException : AGraphQLSelectExcepti /// Creates a new DuplicateAttributeSelectionException exception /// /// The alias to use - public DuplicateAttributeSelectionException(String mySelectionAlias) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public DuplicateAttributeSelectionException(String mySelectionAlias, Exception innerException = null) : base(innerException) { SelectionAlias = mySelectionAlias; _msg = String.Format("You cannot select \"{0}\" more than one time. Try to use an alias.", SelectionAlias); diff --git a/GraphQL/IGraphQL/ErrorHandling/SelectErrors/GroupedAttributeIsNotSelectedException.cs b/GraphQL/IGraphQL/ErrorHandling/SelectErrors/GroupedAttributeIsNotSelectedException.cs index 8e687ee3..4ff694a6 100644 --- a/GraphQL/IGraphQL/ErrorHandling/SelectErrors/GroupedAttributeIsNotSelectedException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/SelectErrors/GroupedAttributeIsNotSelectedException.cs @@ -33,7 +33,8 @@ public sealed class GroupedAttributeIsNotSelectedException : AGraphQLSelectExcep /// Creates a new GroupedAttributeIsNotSelectedException exception /// /// The name of the type attribute - public GroupedAttributeIsNotSelectedException(String myTypeAttribute) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public GroupedAttributeIsNotSelectedException(String myTypeAttribute, Exception innerException = null) : base(innerException) { TypeAttribute = myTypeAttribute; _msg = String.Format("The attribute '{0}' is not selected and can not be grouped.", TypeAttribute); diff --git a/GraphQL/IGraphQL/ErrorHandling/SelectErrors/InvalidGroupByLevelException.cs b/GraphQL/IGraphQL/ErrorHandling/SelectErrors/InvalidGroupByLevelException.cs index 74b10668..a4fd32df 100644 --- a/GraphQL/IGraphQL/ErrorHandling/SelectErrors/InvalidGroupByLevelException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/SelectErrors/InvalidGroupByLevelException.cs @@ -35,7 +35,9 @@ public sealed class InvalidGroupByLevelException : AGraphQLSelectException /// /// The count of edges of the IDChainDefinition /// - public InvalidGroupByLevelException(String myIDChainDefinitionEdgesCount, String myIDChainDefinitionContentString) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidGroupByLevelException(String myIDChainDefinitionEdgesCount, String myIDChainDefinitionContentString, Exception innerException = null) + : base(innerException) { IDChainDefinitionEdgesCount = myIDChainDefinitionEdgesCount; IDChainDefinitionContentString = myIDChainDefinitionContentString; diff --git a/GraphQL/IGraphQL/ErrorHandling/SelectErrors/InvalidSelectValueAssignmentException.cs b/GraphQL/IGraphQL/ErrorHandling/SelectErrors/InvalidSelectValueAssignmentException.cs index 3d9260a8..9c2f1b87 100644 --- a/GraphQL/IGraphQL/ErrorHandling/SelectErrors/InvalidSelectValueAssignmentException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/SelectErrors/InvalidSelectValueAssignmentException.cs @@ -33,7 +33,8 @@ public sealed class InvalidSelectValueAssignmentException : AGraphQLSelectExcept /// Creates a new InvalidSelectValueAssignmentException exception /// /// - public InvalidSelectValueAssignmentException(String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidSelectValueAssignmentException(String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; _msg = "You can not assign a value to [" + Info + "]"; diff --git a/GraphQL/IGraphQL/ErrorHandling/SelectErrors/MultipleResultsException.cs b/GraphQL/IGraphQL/ErrorHandling/SelectErrors/MultipleResultsException.cs index 5be67c1a..24916f21 100644 --- a/GraphQL/IGraphQL/ErrorHandling/SelectErrors/MultipleResultsException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/SelectErrors/MultipleResultsException.cs @@ -30,7 +30,8 @@ public sealed class MultipleResultsException : AGraphQLSelectException /// /// Creates a new MultipleResultsException exception /// - public MultipleResultsException() + /// The exception that is the cause of the current exception, this parameter can be NULL. + public MultipleResultsException(Exception innerException = null) : base(innerException) { _msg = "The selection returned more than one result. This is not allowed for the INSERTORUPDATE/INSERTORREPLACE statement."; } diff --git a/GraphQL/IGraphQL/ErrorHandling/SelectErrors/NoGroupingArgumentException.cs b/GraphQL/IGraphQL/ErrorHandling/SelectErrors/NoGroupingArgumentException.cs index d6425ece..bced1d8d 100644 --- a/GraphQL/IGraphQL/ErrorHandling/SelectErrors/NoGroupingArgumentException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/SelectErrors/NoGroupingArgumentException.cs @@ -34,7 +34,8 @@ public sealed class NoGroupingArgumentException : AGraphQLSelectException /// Creates a new NoGroupingArgumentException exception /// /// The selection - public NoGroupingArgumentException(String mySelection) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public NoGroupingArgumentException(String mySelection, Exception innerException = null) : base(innerException) { Selection = mySelection; _msg = "A selection with aggregates must be grouped. Missing for selection " + Selection; diff --git a/GraphQL/IGraphQL/ErrorHandling/SelectErrors/SelectTimeOutException.cs b/GraphQL/IGraphQL/ErrorHandling/SelectErrors/SelectTimeOutException.cs index 02857b63..a2ee5318 100644 --- a/GraphQL/IGraphQL/ErrorHandling/SelectErrors/SelectTimeOutException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/SelectErrors/SelectTimeOutException.cs @@ -33,7 +33,8 @@ public sealed class SelectTimeOutException : AGraphQLSelectException /// Creates a new SelectTimeOutException exception /// /// The timeout - public SelectTimeOutException(Int64 myTimeout) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public SelectTimeOutException(Int64 myTimeout, Exception innerException = null) : base(innerException) { TimeOut = myTimeout; _msg = String.Format("Aborting query because the timeout of {0}ms has been reached.", TimeOut); diff --git a/GraphQL/IGraphQL/ErrorHandling/SelectErrors/SelectValueAssignmentDataTypeDoesNotMatchException.cs b/GraphQL/IGraphQL/ErrorHandling/SelectErrors/SelectValueAssignmentDataTypeDoesNotMatchException.cs index 393defee..ba2a546d 100644 --- a/GraphQL/IGraphQL/ErrorHandling/SelectErrors/SelectValueAssignmentDataTypeDoesNotMatchException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/SelectErrors/SelectValueAssignmentDataTypeDoesNotMatchException.cs @@ -35,7 +35,8 @@ public class SelectValueAssignmentDataTypeDoesNotMatchException : AGraphQLSelect /// /// The expected data type /// The current data type - public SelectValueAssignmentDataTypeDoesNotMatchException(String myExpectedDataType, String myDataType) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public SelectValueAssignmentDataTypeDoesNotMatchException(String myExpectedDataType, String myDataType, Exception innerException = null) : base(innerException) { ExpectedDataType = myExpectedDataType; DataType = myDataType; diff --git a/GraphQL/IGraphQL/ErrorHandling/UnknownQLException.cs b/GraphQL/IGraphQL/ErrorHandling/UnknownQLException.cs index afbf6a18..a5c2f2d6 100644 --- a/GraphQL/IGraphQL/ErrorHandling/UnknownQLException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/UnknownQLException.cs @@ -27,20 +27,14 @@ namespace sones.GraphQL.ErrorHandling /// public sealed class UnknownQLException : AGraphQLException { - /// - /// The exception that has been thrown - /// - public Exception ThrownException { get; private set; } - - #region constructor + #region constructor /// /// Creates a new UnknownQL exception /// - /// - public UnknownQLException(Exception e) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public UnknownQLException(Exception innerException = null) : base(innerException) { - ThrownException = e; _msg = "An unknown error has occurred."; } diff --git a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/AGraphQLVertexAttributeException.cs b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/AGraphQLVertexAttributeException.cs index 2ed06e9e..b2f9d9ad 100644 --- a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/AGraphQLVertexAttributeException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/AGraphQLVertexAttributeException.cs @@ -18,9 +18,17 @@ * */ +using System; + namespace sones.GraphQL.ErrorHandling { public abstract class AGraphQLVertexAttributeException : AGraphQLException - { + { + /// + /// Initializes a new instance of the AGraphQLVertexAttributeException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AGraphQLVertexAttributeException(Exception innerException = null) : base(innerException) + {} } } diff --git a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/AmbiguousVertexAttributeException.cs b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/AmbiguousVertexAttributeException.cs index 11137223..be48c051 100644 --- a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/AmbiguousVertexAttributeException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/AmbiguousVertexAttributeException.cs @@ -33,7 +33,8 @@ public sealed class AmbiguousVertexAttributeException : AGraphQLVertexAttributeE /// Creates a new AmbiguousVertexAttributeException exception /// /// - public AmbiguousVertexAttributeException(String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AmbiguousVertexAttributeException(String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; _msg = Info; diff --git a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidUndefinedVertexAttributeNameException.cs b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidUndefinedVertexAttributeNameException.cs index 45389bc1..4f22427a 100644 --- a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidUndefinedVertexAttributeNameException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidUndefinedVertexAttributeNameException.cs @@ -18,6 +18,8 @@ * */ +using System; + namespace sones.GraphQL.ErrorHandling { /// @@ -28,7 +30,8 @@ public sealed class InvalidUndefinedVertexAttributeNameException : AGraphQLVerte /// /// Creates a new InvalidUndefinedVertexAttributeNameException exception /// - public InvalidUndefinedVertexAttributeNameException() + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidUndefinedVertexAttributeNameException(Exception innerException = null) : base(innerException) { _msg = "An undefined attribute with an \".\" is not allowed."; } diff --git a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidUndefinedVertexAttributesException.cs b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidUndefinedVertexAttributesException.cs index 82418dc2..da44d96d 100644 --- a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidUndefinedVertexAttributesException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidUndefinedVertexAttributesException.cs @@ -32,17 +32,23 @@ public sealed class InvalidUndefinedVertexAttributesException : AGraphQLVertexAt public String AttrName { get; private set; } public List ListOfAttrNames { get; private set; } - public InvalidUndefinedVertexAttributesException(String myAttrName) + /// + /// Initializes a new instance of the InvalidUndefinedVertexAttributesException class using an attribute name. + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidUndefinedVertexAttributesException(String myAttrName, Exception innerException = null) : base(innerException) { AttrName = myAttrName; _msg = String.Format("The vertex does not contain an undefined attribute with name \" {0} \".", AttrName); } /// - /// Creates a new InvalidUndefinedVertexAttributesException exception + /// Creates a new InvalidUndefinedVertexAttributesException exception using a list of attribute names. /// /// A list of attribute names - public InvalidUndefinedVertexAttributesException(List myListOfAttrNames) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidUndefinedVertexAttributesException(List myListOfAttrNames, Exception innerException = null) : base(innerException) { ListOfAttrNames = myListOfAttrNames; String retVal = ListOfAttrNames[0]; diff --git a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeException.cs b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeException.cs index 1bf75125..c2687c67 100644 --- a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeException.cs @@ -33,7 +33,8 @@ public sealed class InvalidVertexAttributeException : AGraphQLVertexAttributeExc /// Creates a new InvalidVertexAttributeException exception /// /// - public InvalidVertexAttributeException(String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidVertexAttributeException(String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; _msg = String.Format("The vertex attribute is not valid: {0}", Info); diff --git a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeKindException.cs b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeKindException.cs index 53baef45..43a63196 100644 --- a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeKindException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeKindException.cs @@ -41,7 +41,8 @@ public sealed class InvalidVertexAttributeKindException : AGraphQLVertexAttribut /// /// Creates a new InvalidVertexAttributeKindException exception /// - public InvalidVertexAttributeKindException() + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidVertexAttributeKindException(Exception innerException = null) : base(innerException) { ExpectedKindsOfType = new String[0]; _msg = "The given kind does not match the expected"; diff --git a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeValueException.cs b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeValueException.cs index 0b30e67d..41e07a89 100644 --- a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeValueException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/InvalidVertexAttributeValueException.cs @@ -35,7 +35,8 @@ public sealed class InvalidVertexAttributeValueException : AGraphQLVertexAttribu /// /// The name of the attribute /// The value of the attribute - public InvalidVertexAttributeValueException(String myAttributeName, Object myAttributeValue) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidVertexAttributeValueException(String myAttributeName, Object myAttributeValue, Exception innerException = null) : base(innerException) { AttributeName = myAttributeName; AttributeValue = myAttributeValue; diff --git a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/RemoveVertexTypeAttributeException.cs b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/RemoveVertexTypeAttributeException.cs index 23d25be1..ec9882ce 100644 --- a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/RemoveVertexTypeAttributeException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/RemoveVertexTypeAttributeException.cs @@ -35,7 +35,9 @@ public sealed class RemoveVertexTypeAttributeException : AGraphQLVertexAttribute /// /// The name of the vertex type /// The name of the vertex attribute - public RemoveVertexTypeAttributeException(String myVertexTypeName, String myVertexAttributeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public RemoveVertexTypeAttributeException(String myVertexTypeName, String myVertexAttributeName, Exception innerException = null) + : base(innerException) { VertexTypeName = myVertexTypeName; VertexAttributeName = myVertexAttributeName; diff --git a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/UpdateListVertexAttributeNoElementsException.cs b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/UpdateListVertexAttributeNoElementsException.cs index 55130f39..6221ca75 100644 --- a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/UpdateListVertexAttributeNoElementsException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/UpdateListVertexAttributeNoElementsException.cs @@ -33,7 +33,8 @@ public sealed class UpdateListVertexAttributeNoElementsException : AGraphQLVerte /// Creates a new UpdateListVertexAttributeNoElementsException exception /// /// The name of the attribute - public UpdateListVertexAttributeNoElementsException(String myAttributeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public UpdateListVertexAttributeNoElementsException(String myAttributeName, Exception innerException = null) : base(innerException) { AttributeName = myAttributeName; _msg = String.Format("Could not find any objects while adding or removing elements to the list attribute {0}.", AttributeName); diff --git a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/UpdateVertexAttributeValueException.cs b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/UpdateVertexAttributeValueException.cs index 3728e6c1..726e94f9 100644 --- a/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/UpdateVertexAttributeValueException.cs +++ b/GraphQL/IGraphQL/ErrorHandling/VertexTypeAttributeErrors/UpdateVertexAttributeValueException.cs @@ -33,7 +33,8 @@ public sealed class UpdateVertexAttributeValueException : AGraphQLVertexAttribut /// Creates a new UpdateVertexAttributeValueException exception /// /// The name of the vertex attribute - public UpdateVertexAttributeValueException(String myVertexAttributeName) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public UpdateVertexAttributeValueException(String myVertexAttributeName, Exception innerException = null) : base(innerException) { VertexAttributeName = myVertexAttributeName; _msg = String.Format("Could not update value for vertex attribute \"{0}\".", VertexAttributeName); diff --git a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/AggregateOrFunctionDoesNotExistException.cs b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/AggregateOrFunctionDoesNotExistException.cs index 7466825a..9918bb22 100644 --- a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/AggregateOrFunctionDoesNotExistException.cs +++ b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/AggregateOrFunctionDoesNotExistException.cs @@ -33,7 +33,6 @@ public sealed class AggregateOrFunctionDoesNotExistException : AGraphQLException public String Info { get; private set; } public String AggrOrFuncName { get; private set; } - public ASonesException Exception { get; private set; } public Type AggrOrFuncType { get; private set; } #endregion @@ -43,17 +42,17 @@ public sealed class AggregateOrFunctionDoesNotExistException : AGraphQLException /// /// Creates a new AggregateOrFunctionDoesNotExistException exception /// - public AggregateOrFunctionDoesNotExistException(Type myAggrOrFuncType, String myAggrOrFuncName, String myInfo, ASonesException myException = null) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public AggregateOrFunctionDoesNotExistException(Type myAggrOrFuncType, String myAggrOrFuncName, String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; - Exception = myException; AggrOrFuncType = myAggrOrFuncType; AggrOrFuncName = myAggrOrFuncName; - if (Exception != null) + if (InnerException != null) { - if (Exception.Message != null && !Exception.Message.Equals("")) - _msg = String.Format("Error during loading the aggregate plugin of type: [{0}] name: [{1}]\n\nInner Exception: {2}\n\n{3}", myAggrOrFuncType.ToString(), myAggrOrFuncName, Exception.Message, myInfo); + if(InnerException.Message != null && !InnerException.Message.Equals("")) + _msg = String.Format("Error during loading the aggregate plugin of type: [{0}] name: [{1}]\n\nInner Exception: {2}\n\n{3}", myAggrOrFuncType.ToString(), myAggrOrFuncName, InnerException.Message, myInfo); else _msg = String.Format("Error during loading the aggregate plugin of type: [{0}] name: [{1}]\n\n{2}", myAggrOrFuncType.ToString(), myAggrOrFuncName, myInfo); } diff --git a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/EdgeTypeDoesNotExistException.cs b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/EdgeTypeDoesNotExistException.cs index 4c124e65..2cedff3a 100644 --- a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/EdgeTypeDoesNotExistException.cs +++ b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/EdgeTypeDoesNotExistException.cs @@ -40,7 +40,8 @@ public sealed class EdgeTypeDoesNotExistException : AGraphQLException /// /// Creates a new EdgeTypeDoesNotExistException exception /// - public EdgeTypeDoesNotExistException(String myEdge, String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public EdgeTypeDoesNotExistException(String myEdge, String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; Edge = myEdge; diff --git a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/ExpressionGraphInternalException.cs b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/ExpressionGraphInternalException.cs index f9781213..4fcc26ca 100644 --- a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/ExpressionGraphInternalException.cs +++ b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/ExpressionGraphInternalException.cs @@ -31,7 +31,12 @@ public sealed class ExpressionGraphInternalException : AGraphQLException { public String Info { get; private set; } - public ExpressionGraphInternalException(String myInfo) + /// + /// Initializes a new instance of the ExpressionGraphInternalException class. + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public ExpressionGraphInternalException(String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; _msg = String.Format("An internal ExpressionGraph error occurred: \"{0}\"\nStacktrace:\n{1}", Info, StackTrace); diff --git a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/GQLGrammarSetExtandableMemberException.cs b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/GQLGrammarSetExtandableMemberException.cs index 5d7f2a60..9bc47673 100644 --- a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/GQLGrammarSetExtandableMemberException.cs +++ b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/GQLGrammarSetExtandableMemberException.cs @@ -42,7 +42,8 @@ public sealed class GQLGrammarSetExtandableMemberException : AGraphQLException /// /// The extandable member which occurs the error /// Exception info - public GQLGrammarSetExtandableMemberException(Type myMemberType, String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public GQLGrammarSetExtandableMemberException(Type myMemberType, String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; ExtandableMemberType = myMemberType; diff --git a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/GQLParsingException.cs b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/GQLParsingException.cs index cee660f8..5622685e 100644 --- a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/GQLParsingException.cs +++ b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/GQLParsingException.cs @@ -32,7 +32,6 @@ public sealed class GQLParsingException : AGraphQLException #region data public String Info { get; private set; } - public Exception Exception { get; private set; } public ParserMessage ParserError { get; private set; } public String ParserErrorMessage @@ -52,7 +51,8 @@ public String ParserErrorMessage /// /// The parser message from Irony (contains a message from kind of info, warning or error) /// The given query - public GQLParsingException(ParserMessage myParserError, String myQuery) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public GQLParsingException(ParserMessage myParserError, String myQuery, Exception innerException = null) : base(innerException) { ParserError = myParserError; Info = myQuery; @@ -70,14 +70,13 @@ public GQLParsingException(ParserMessage myParserError, String myQuery) /// Creates a new GQLParsingException exception /// /// An information - /// The occurred exception - public GQLParsingException(String myInfo, Exception myException) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public GQLParsingException(String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; - Exception = myException; - - if (myException != null) - _msg = Info + Environment.NewLine + Exception.Message; + + if (InnerException != null) + _msg = Info + Environment.NewLine + InnerException.Message; } #endregion diff --git a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/GQLStatementNodeExecutionException.cs b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/GQLStatementNodeExecutionException.cs index 999cbdf7..fbf41617 100644 --- a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/GQLStatementNodeExecutionException.cs +++ b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/GQLStatementNodeExecutionException.cs @@ -35,8 +35,7 @@ public sealed class GQLStatementNodeExecutionException : AGraphQLException public String Info { get; private set; } public AStatement Statement { get; private set; } public String Query { get; private set; } - ASonesException InnerException; - + #endregion #region constructor @@ -46,13 +45,13 @@ public sealed class GQLStatementNodeExecutionException : AGraphQLException /// /// The parser message from Irony (contains a message from kind of info, warning or error) /// The given query - public GQLStatementNodeExecutionException(String myQuery, AStatement myStatement, String myInfo, ASonesException myInnerException = null) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public GQLStatementNodeExecutionException(String myQuery, AStatement myStatement, String myInfo, Exception innerException = null) : base(innerException) { Query = myQuery; Statement = myStatement; Info = myInfo; - InnerException = myInnerException; - + if(InnerException != null) _msg = String.Format("Error during execute statement: [{0}]\n\n in query: [{1}]\n\n{2}", Statement.StatementName, Query, Info); else diff --git a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/GqlSyntaxException.cs b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/GqlSyntaxException.cs index 432bc54f..4ff8e5b0 100644 --- a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/GqlSyntaxException.cs +++ b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/GqlSyntaxException.cs @@ -52,7 +52,8 @@ public String SyntaxErrorMessage /// /// The parser message from Irony (contains a message from kind of info, warning or error) /// The given query - public GqlSyntaxException(ParserMessage mySyntaxError, String myQuery) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public GqlSyntaxException(ParserMessage mySyntaxError, String myQuery, Exception innerException = null) : base(innerException) { SyntaxError = mySyntaxError; Info = myQuery; @@ -70,24 +71,14 @@ public GqlSyntaxException(ParserMessage mySyntaxError, String myQuery) /// Creates a new GqlSyntaxException exception /// /// - public GqlSyntaxException(String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public GqlSyntaxException(String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; _msg = Info; - } - - /// - /// Creates a new GqlSyntaxException exception - /// - /// An information - /// The occurred exception - public GqlSyntaxException(String myInfo, Exception myException) - { - Info = myInfo; - Exception = myException; - if (myException != null) - _msg = Info + Environment.NewLine + Exception.Message; + if(InnerException != null) + _msg += Environment.NewLine + Exception.Message; } #endregion diff --git a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/IndexTypeDoesNotExistException.cs b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/IndexTypeDoesNotExistException.cs index dcf63ac7..edd2a966 100644 --- a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/IndexTypeDoesNotExistException.cs +++ b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/IndexTypeDoesNotExistException.cs @@ -40,7 +40,8 @@ public sealed class IndexTypeDoesNotExistException : AGraphQLException /// /// Creates a new EdgeTypeDoesNotExistException exception /// - public IndexTypeDoesNotExistException(String myIndex, String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public IndexTypeDoesNotExistException(String myIndex, String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; Index = myIndex; diff --git a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidBinaryExpressionException.cs b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidBinaryExpressionException.cs index d9da1df1..1fe05d6e 100644 --- a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidBinaryExpressionException.cs +++ b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidBinaryExpressionException.cs @@ -30,7 +30,12 @@ namespace sones.GraphQL.GQL.ErrorHandling { public sealed class InvalidBinaryExpressionException : AGraphQLException { - public InvalidBinaryExpressionException(BinaryExpressionDefinition myBinaryExpression) + /// + /// Initializes a new instance of the BinaryExpressionDefinition class. + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidBinaryExpressionException(BinaryExpressionDefinition myBinaryExpression, Exception innerException = null) : base(innerException) { _msg = String.Format("The BinaryExpression is not valid: {0} {1} {2}", myBinaryExpression.Left.ToString(), myBinaryExpression.Operator, myBinaryExpression.Right.ToString()); } diff --git a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidDumpFormatException.cs b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidDumpFormatException.cs index 8b5bf74b..349a0e7e 100644 --- a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidDumpFormatException.cs +++ b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidDumpFormatException.cs @@ -36,7 +36,8 @@ class InvalidDumpFormatException : AGraphQLException /// /// Creates a new InvalidDumpFormatException exception /// - public InvalidDumpFormatException(String myDumpFormat, String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidDumpFormatException(String myDumpFormat, String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; DumpFormat = myDumpFormat; diff --git a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidDumpTypeException.cs b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidDumpTypeException.cs index c7232468..41429438 100644 --- a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidDumpTypeException.cs +++ b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidDumpTypeException.cs @@ -36,7 +36,8 @@ public sealed class InvalidDumpTypeException : AGraphQLException /// /// Creates a new InvalidDumpTypeException exception /// - public InvalidDumpTypeException(String myDumpType, String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidDumpTypeException(String myDumpType, String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; DumpType = myDumpType; diff --git a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidEdgeListOperationException.cs b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidEdgeListOperationException.cs index 346128b3..ff3ff8ef 100644 --- a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidEdgeListOperationException.cs +++ b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidEdgeListOperationException.cs @@ -36,14 +36,28 @@ public sealed class InvalidEdgeListOperationException : AGraphQLException private EdgeKey _EdgeKey; private string _Operation; - public InvalidEdgeListOperationException(EdgeList myEdgeList, EdgeKey myEdgeKey, string myOperation) + /// + /// Initializes a new instance of the InvalidEdgeListOperationException using an edge key. + /// + /// + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidEdgeListOperationException(EdgeList myEdgeList, EdgeKey myEdgeKey, string myOperation, Exception innerException = null) : base(innerException) { _EdgeList1 = myEdgeList; this._EdgeKey = myEdgeKey; this._Operation = myOperation; } - public InvalidEdgeListOperationException(EdgeList myEdgeList1, EdgeList myEdgeList2, string myOperation) + /// + /// Initializes a new instance of the InvalidEdgeListOperationException using an edge list. + /// + /// + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidEdgeListOperationException(EdgeList myEdgeList1, EdgeList myEdgeList2, string myOperation, Exception innerException = null) : base(innerException) { _EdgeList1 = myEdgeList1; _EdgeList2 = myEdgeList2; diff --git a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidLevelKeyOperationException.cs b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidLevelKeyOperationException.cs index 603c4253..d6a9ddf2 100644 --- a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidLevelKeyOperationException.cs +++ b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidLevelKeyOperationException.cs @@ -36,14 +36,28 @@ public sealed class InvalidLevelKeyOperationException : AGraphQLException public EdgeKey EdgeKeyB { get; private set; } public String Operation { get; private set; } - public InvalidLevelKeyOperationException(LevelKey myLevelKey, EdgeKey myEdgeKey, String myOperation) + /// + /// Initializes a new instance of the InvalidLevelKeyOperationException using an edge key. + /// + /// + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidLevelKeyOperationException(LevelKey myLevelKey, EdgeKey myEdgeKey, String myOperation, Exception innerException = null) : base(innerException) { LevelKeyA = myLevelKey; EdgeKeyA = myEdgeKey; Operation = myOperation; } - public InvalidLevelKeyOperationException(LevelKey myLevelKeyA, LevelKey myLevelKeyB, String myOperation) + /// + /// Initializes a new instance of the InvalidLevelKeyOperationException using a level key. + /// + /// + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidLevelKeyOperationException(LevelKey myLevelKeyA, LevelKey myLevelKeyB, String myOperation, Exception innerException = null) : base(innerException) { LevelKeyA = myLevelKeyA; LevelKeyB = myLevelKeyB; diff --git a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidTransactionIsolationLevelException.cs b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidTransactionIsolationLevelException.cs index 3779c8f7..de071adc 100644 --- a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidTransactionIsolationLevelException.cs +++ b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/InvalidTransactionIsolationLevelException.cs @@ -31,7 +31,13 @@ public sealed class InvalidTransactionIsolationLevelException : AGraphQLExceptio public String Isolation; public String Info; - public InvalidTransactionIsolationLevelException(String myIsolationLevel, String myInfo) + /// + /// Initializes a new instance of the InvalidTransactionIsolationLevelException class. + /// + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidTransactionIsolationLevelException(String myIsolationLevel, String myInfo, Exception innerException = null) : base(innerException) { Isolation = myIsolationLevel; Info = myInfo; diff --git a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/IronyInitializeGrammarException.cs b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/IronyInitializeGrammarException.cs index 1d35f4d9..5f0fbf2d 100644 --- a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/IronyInitializeGrammarException.cs +++ b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/IronyInitializeGrammarException.cs @@ -33,7 +33,13 @@ public sealed class IronyInitializeGrammarException : AGraphQLException private GrammarErrorList Errors; - public IronyInitializeGrammarException(GrammarErrorList myErrors, String myInfo) + /// + /// Initializes a new instance of the IronyInitializeGrammarException class. + /// + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public IronyInitializeGrammarException(GrammarErrorList myErrors, String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; diff --git a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/NotADumpableGrammarException.cs b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/NotADumpableGrammarException.cs index 7850839a..886a1ee9 100644 --- a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/NotADumpableGrammarException.cs +++ b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/NotADumpableGrammarException.cs @@ -39,7 +39,8 @@ public sealed class NotADumpableGrammarException : AGraphQLException /// /// Creates a new NotADumpableGrammarException exception /// - public NotADumpableGrammarException(String myGrammar, String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public NotADumpableGrammarException(String myGrammar, String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; Grammar = myGrammar; diff --git a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/VertexTypeDoesNotExistException.cs b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/VertexTypeDoesNotExistException.cs index 4d6ec62a..83451ef9 100644 --- a/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/VertexTypeDoesNotExistException.cs +++ b/GraphQL/Implementations/SonesGraphQueryLanguage/ErrorHandling/VertexTypeDoesNotExistException.cs @@ -40,7 +40,8 @@ public sealed class VertexTypeDoesNotExistException : AGraphQLException /// /// Creates a new EdgeTypeDoesNotExistException exception /// - public VertexTypeDoesNotExistException(String myVertex, String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public VertexTypeDoesNotExistException(String myVertex, String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; Vertex = myVertex; diff --git a/Library/Internal/CollectionWrapper/ErrorHandling/ACollectionException.cs b/Library/Internal/CollectionWrapper/ErrorHandling/ACollectionException.cs index 7d88a7fe..275ca2b3 100644 --- a/Library/Internal/CollectionWrapper/ErrorHandling/ACollectionException.cs +++ b/Library/Internal/CollectionWrapper/ErrorHandling/ACollectionException.cs @@ -28,5 +28,11 @@ namespace sones.Library.CollectionWrapper.ErrorHandling /// public abstract class ACollectionException : ASonesException { + /// + /// Initializes a new instance of the ACollectionException. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public ACollectionException(Exception innerException = null) : base(innerException) + {} } } diff --git a/Library/Internal/CollectionWrapper/ErrorHandling/InvalidCollectionComparismException.cs b/Library/Internal/CollectionWrapper/ErrorHandling/InvalidCollectionComparismException.cs index 7cb3368f..c5c36780 100644 --- a/Library/Internal/CollectionWrapper/ErrorHandling/InvalidCollectionComparismException.cs +++ b/Library/Internal/CollectionWrapper/ErrorHandling/InvalidCollectionComparismException.cs @@ -34,7 +34,8 @@ public sealed class InvalidCollectionComparismException : ACollectionException /// Creates a new invalid expression exception /// /// The expression that has been declared as invalid - public InvalidCollectionComparismException(String myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidCollectionComparismException(String myInfo, Exception innerException = null) : base(innerException) { _msg = myInfo; } diff --git a/Library/Internal/ErrorHandling/UnknownException.cs b/Library/Internal/ErrorHandling/UnknownException.cs index 97b419e7..e8b00f28 100644 --- a/Library/Internal/ErrorHandling/UnknownException.cs +++ b/Library/Internal/ErrorHandling/UnknownException.cs @@ -30,10 +30,11 @@ public sealed class UnknownException : ASonesException #region constructor /// - /// Creates a new unknown exception + /// Creates a new unknown exception. /// - /// The thrown exception - public UnknownException(Exception e):base(e) + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public UnknownException(Exception innerException = null) : base(innerException) { _msg = "An unknown exception was thrown. See InnerException for further information."; } diff --git a/Library/Internal/PropertyHyperGraph/ErrorHandling/BinaryNotExistentException.cs b/Library/Internal/PropertyHyperGraph/ErrorHandling/BinaryNotExistentException.cs index 3135993c..3bd49e4a 100644 --- a/Library/Internal/PropertyHyperGraph/ErrorHandling/BinaryNotExistentException.cs +++ b/Library/Internal/PropertyHyperGraph/ErrorHandling/BinaryNotExistentException.cs @@ -43,7 +43,8 @@ public class BinaryNotExistentException : ASonesException /// Creates a new binary not existent exception. /// /// The binary property id. - public BinaryNotExistentException(Int64 myPropertyID) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public BinaryNotExistentException(Int64 myPropertyID, Exception innerException = null) : base(innerException) { PropertyID = myPropertyID; } diff --git a/Library/Internal/Settings/ErrorHandling/ASettingsException.cs b/Library/Internal/Settings/ErrorHandling/ASettingsException.cs index ff237ed3..e5caeeca 100644 --- a/Library/Internal/Settings/ErrorHandling/ASettingsException.cs +++ b/Library/Internal/Settings/ErrorHandling/ASettingsException.cs @@ -19,10 +19,18 @@ */ using sones.Library.ErrorHandling; +using System; namespace sones.Library.Settings.ErrorHandling { public abstract class ASettingsException : ASonesException { + /// + /// Initializes a new instance of the ASettingsException. + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public ASettingsException(Exception innerException = null) : base(innerException) + {} } } diff --git a/Library/Internal/Settings/ErrorHandling/CouldNotLoadSettingFileException.cs b/Library/Internal/Settings/ErrorHandling/CouldNotLoadSettingFileException.cs index d5127102..689163e6 100644 --- a/Library/Internal/Settings/ErrorHandling/CouldNotLoadSettingFileException.cs +++ b/Library/Internal/Settings/ErrorHandling/CouldNotLoadSettingFileException.cs @@ -42,7 +42,8 @@ public sealed class CouldNotLoadSettingFileException : ASettingsException /// creates a new CouldNotLoadSettingFileException /// /// An information about what went wrong - public CouldNotLoadSettingFileException(String myInformation) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public CouldNotLoadSettingFileException(String myInformation, Exception innerException = null) : base(innerException) { Info = myInformation; } diff --git a/Library/Internal/Settings/ErrorHandling/DataTypeMismatchException.cs b/Library/Internal/Settings/ErrorHandling/DataTypeMismatchException.cs index 40fb00bb..e2b15bdd 100644 --- a/Library/Internal/Settings/ErrorHandling/DataTypeMismatchException.cs +++ b/Library/Internal/Settings/ErrorHandling/DataTypeMismatchException.cs @@ -48,7 +48,8 @@ public sealed class DataTypeMismatchException : ASettingsException /// /// The type that is expected by the setting /// The type of the actual setting - public DataTypeMismatchException(Type myReferenceType, Type myActualType) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public DataTypeMismatchException(Type myReferenceType, Type myActualType, Exception innerException = null) : base(innerException) { ReferenceType = myReferenceType; ActualType = myActualType; diff --git a/Library/Internal/Settings/ErrorHandling/InvalidXMLFormatException.cs b/Library/Internal/Settings/ErrorHandling/InvalidXMLFormatException.cs index acba3cf0..a613d398 100644 --- a/Library/Internal/Settings/ErrorHandling/InvalidXMLFormatException.cs +++ b/Library/Internal/Settings/ErrorHandling/InvalidXMLFormatException.cs @@ -42,7 +42,8 @@ public sealed class InvalidXMLFormatException : ASettingsException /// creates a new InvalidXMLFormatException /// /// An information about whats not well formed - public InvalidXMLFormatException(String myInformation) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidXMLFormatException(String myInformation, Exception innerException = null) : base(innerException) { Info = myInformation; } diff --git a/Library/Internal/VersionedPluginManager/ErrorHandling/APluginManagerException.cs b/Library/Internal/VersionedPluginManager/ErrorHandling/APluginManagerException.cs index 439705a5..4a4db84c 100644 --- a/Library/Internal/VersionedPluginManager/ErrorHandling/APluginManagerException.cs +++ b/Library/Internal/VersionedPluginManager/ErrorHandling/APluginManagerException.cs @@ -19,6 +19,7 @@ */ using sones.Library.ErrorHandling; +using System; namespace sones.Library.VersionedPluginManager.ErrorHandling { @@ -27,5 +28,11 @@ namespace sones.Library.VersionedPluginManager.ErrorHandling /// public abstract class APluginManagerException : ASonesException { + /// + /// Initializes a new instance of the APluginManagerException. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public APluginManagerException(Exception innerException = null) : base(innerException) + {} } } diff --git a/Library/Internal/VersionedPluginManager/ErrorHandling/CouldNotLoadAssemblyException.cs b/Library/Internal/VersionedPluginManager/ErrorHandling/CouldNotLoadAssemblyException.cs index d773e879..da7bf105 100644 --- a/Library/Internal/VersionedPluginManager/ErrorHandling/CouldNotLoadAssemblyException.cs +++ b/Library/Internal/VersionedPluginManager/ErrorHandling/CouldNotLoadAssemblyException.cs @@ -42,7 +42,7 @@ public sealed class CouldNotLoadAssemblyException : APluginManagerException /// Creates a new CouldNotLoadAssemblyException exception /// /// The path of the assembly file - public CouldNotLoadAssemblyException(String myAssemblyFile) + public CouldNotLoadAssemblyException(String myAssemblyFile, Exception innerException = null) : base(innerException) { AssemblyFile = myAssemblyFile; _msg = "An assembly could not be loaded due to an incompatible platform "; diff --git a/Library/Internal/VersionedPluginManager/ErrorHandling/DuplicatePluginException.cs b/Library/Internal/VersionedPluginManager/ErrorHandling/DuplicatePluginException.cs index 4843c0e5..c48df42e 100644 --- a/Library/Internal/VersionedPluginManager/ErrorHandling/DuplicatePluginException.cs +++ b/Library/Internal/VersionedPluginManager/ErrorHandling/DuplicatePluginException.cs @@ -54,7 +54,9 @@ public sealed class DuplicatePluginException : APluginManagerException /// The name of the duplicate plugin /// The type of the duplicate plugin /// The name of the component that complains about a duplicate plugin - public DuplicatePluginException(String myDuplicatePluginName, Type myPluginType, String myComplainingComponent) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public DuplicatePluginException(String myDuplicatePluginName, Type myPluginType, String myComplainingComponent, Exception innerException = null) + : base(innerException) { PluginName = myDuplicatePluginName; ComplainingComponent = myComplainingComponent; diff --git a/Library/Internal/VersionedPluginManager/ErrorHandling/IncompatiblePluginVersionException.cs b/Library/Internal/VersionedPluginManager/ErrorHandling/IncompatiblePluginVersionException.cs index 5fbe2ed3..318b038c 100644 --- a/Library/Internal/VersionedPluginManager/ErrorHandling/IncompatiblePluginVersionException.cs +++ b/Library/Internal/VersionedPluginManager/ErrorHandling/IncompatiblePluginVersionException.cs @@ -60,8 +60,9 @@ public sealed class IncompatiblePluginVersionException : APluginManagerException /// The current plugin assembly /// The current version of the plugin interface /// The minimum expected verion of the plugin interface + /// The exception that is the cause of the current exception, this parameter can be NULL. public IncompatiblePluginVersionException(Assembly myPluginAssembly, Version myCurrentVersion, - Version myMinVersion) + Version myMinVersion, Exception innerException = null) : base(innerException) { PluginAssembly = myPluginAssembly; CurrentVersion = myCurrentVersion; diff --git a/Library/Internal/VersionedPluginManager/ErrorHandling/UnknownPluginException.cs b/Library/Internal/VersionedPluginManager/ErrorHandling/UnknownPluginException.cs index 72f7519b..968aba64 100644 --- a/Library/Internal/VersionedPluginManager/ErrorHandling/UnknownPluginException.cs +++ b/Library/Internal/VersionedPluginManager/ErrorHandling/UnknownPluginException.cs @@ -48,7 +48,8 @@ public sealed class UnknownPluginException : APluginManagerException /// /// The name of the unknown plugin /// The type of the unknown plugin - public UnknownPluginException(String myUnknownPluginName, Type myPluginType) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public UnknownPluginException(String myUnknownPluginName, Type myPluginType, Exception innerException = null) : base(innerException) { PluginName = myUnknownPluginName; PluginType = myPluginType; diff --git a/Plugins/GraphDS/IO/Implementation/XML_IO/ErrorHandling/QueryException.cs b/Plugins/GraphDS/IO/Implementation/XML_IO/ErrorHandling/QueryException.cs index af63f66f..493c7c2d 100644 --- a/Plugins/GraphDS/IO/Implementation/XML_IO/ErrorHandling/QueryException.cs +++ b/Plugins/GraphDS/IO/Implementation/XML_IO/ErrorHandling/QueryException.cs @@ -28,9 +28,13 @@ namespace sones.Plugins.GraphDS.IO.XML_IO.ErrorHandling { public class QueryException : AGraphDSException { - public QueryException(String myMessage) + /// + /// Initializes a new instance of the QueryException class. + /// + /// The message that describes the failure. This parameter can be NULL. + /// The exception that is the cause of the current exception, this parameter can be NULL. + public QueryException(String message, Exception innerException = null) : base(message, innerException) { - _msg = myMessage; } } } diff --git a/Plugins/GraphDS/IO/Implementation/XML_IO/ErrorHandling/XmlValidationException.cs b/Plugins/GraphDS/IO/Implementation/XML_IO/ErrorHandling/XmlValidationException.cs index 435a8b6f..5b5cf48f 100644 --- a/Plugins/GraphDS/IO/Implementation/XML_IO/ErrorHandling/XmlValidationException.cs +++ b/Plugins/GraphDS/IO/Implementation/XML_IO/ErrorHandling/XmlValidationException.cs @@ -28,9 +28,13 @@ namespace sones.Plugins.GraphDS.IO.XML_IO.ErrorHandling { public class XmlValidationException : AGraphDSException { - public XmlValidationException(String myMessage) + /// + /// Initializes a new instance of the XmlValidationException class. + /// + /// The message that describes the failure. This parameter can be NULL. + /// The exception that is the cause of the current exception, this parameter can be NULL. + public XmlValidationException(String message, Exception innerException = null) : base(message, innerException) { - _msg = myMessage; } } } diff --git a/Plugins/GraphDS/IO/Implementation/XML_IO/ErrorHandling/XmlVersionException.cs b/Plugins/GraphDS/IO/Implementation/XML_IO/ErrorHandling/XmlVersionException.cs index bf14a1d2..4349717c 100644 --- a/Plugins/GraphDS/IO/Implementation/XML_IO/ErrorHandling/XmlVersionException.cs +++ b/Plugins/GraphDS/IO/Implementation/XML_IO/ErrorHandling/XmlVersionException.cs @@ -28,9 +28,13 @@ namespace sones.Plugins.GraphDS.IO.XML_IO.ErrorHandling { public class XmlVersionException : AGraphDSException { - public XmlVersionException(String myMessage) + /// + /// Initializes a new instance of the XmlVersionException class. + /// + /// The message that describes the failure. This parameter can be NULL. + /// The exception that is the cause of the current exception, this parameter can be NULL. + public XmlVersionException(String message, Exception innerException = null) : base(message, innerException) { - _msg = myMessage; } } } diff --git a/Plugins/GraphQL/SonesGQL/Aggregates/GQLAggregates/ErrorHandling/InvalidArithmeticAggregationException.cs b/Plugins/GraphQL/SonesGQL/Aggregates/GQLAggregates/ErrorHandling/InvalidArithmeticAggregationException.cs index 34201b05..8476672c 100644 --- a/Plugins/GraphQL/SonesGQL/Aggregates/GQLAggregates/ErrorHandling/InvalidArithmeticAggregationException.cs +++ b/Plugins/GraphQL/SonesGQL/Aggregates/GQLAggregates/ErrorHandling/InvalidArithmeticAggregationException.cs @@ -30,7 +30,14 @@ public sealed class InvalidArithmeticAggregationException : ASonesQLAggregateExc public readonly Type AggregatedType; public readonly string Operation; - public InvalidArithmeticAggregationException(Type myAggregatedType, string myOperation) + /// + /// Initializes a new instance of the InvalidArithmeticAggregationException class. + /// + /// + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidArithmeticAggregationException(Type myAggregatedType, string myOperation, Exception innerException = null) : base(innerException) { // TODO: Complete member initialization AggregatedType = myAggregatedType; diff --git a/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/ASonesQLGraphDBExportException.cs b/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/ASonesQLGraphDBExportException.cs index 8f3800db..c272adcc 100644 --- a/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/ASonesQLGraphDBExportException.cs +++ b/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/ASonesQLGraphDBExportException.cs @@ -26,7 +26,14 @@ namespace sones.Plugins.SonesGQL.DBExport { - public class ASonesQLGraphDBExportException : ASonesException + public abstract class ASonesQLGraphDBExportException : ASonesException { + /// + /// Initializes a new instance of the ASonesQLGraphDBExportException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public ASonesQLGraphDBExportException(Exception innerException = null) : base(innerException) + { + } } } diff --git a/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/ExportFailedException.cs b/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/ExportFailedException.cs index 690e7e1d..cb158715 100644 --- a/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/ExportFailedException.cs +++ b/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/ExportFailedException.cs @@ -30,7 +30,13 @@ public sealed class ExportFailedException : ASonesQLGraphDBExportException private String DumpType; private String Info; - public ExportFailedException(String myDumpType, String myInfo) + /// + /// Initializes a new instance of the ExportFailedException class. + /// + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public ExportFailedException(String myDumpType, String myInfo, Exception innerException = null) : base(innerException) { DumpType = myDumpType; Info = myInfo; diff --git a/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/InvalidDumpLocationException.cs b/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/InvalidDumpLocationException.cs index 64c3dc33..2d87a511 100644 --- a/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/InvalidDumpLocationException.cs +++ b/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/InvalidDumpLocationException.cs @@ -32,7 +32,16 @@ public class InvalidDumpLocationException : ASonesQLGraphDBExportException private String ExpectedFile; private String ExpectedHttp; - public InvalidDumpLocationException(String myLocation, String myExpectedFile, String myExpectedHttp, String myInfo) + /// + /// Initializes a new instance of the InvalidDumpLocationException class. + /// + /// + /// + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidDumpLocationException(String myLocation, String myExpectedFile, String myExpectedHttp, String myInfo, Exception innerException = null) + : base(innerException) { Location = myLocation; Info = myInfo; diff --git a/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/StreamReaderException.cs b/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/StreamReaderException.cs index 88279190..30b0ecaf 100644 --- a/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/StreamReaderException.cs +++ b/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/StreamReaderException.cs @@ -31,11 +31,16 @@ public class StreamReaderException : ASonesQLGraphDBExportException private String Info; private Exception InnerException; - public StreamReaderException(String myStream, String myInfo, Exception myInnerException) + /// + /// Initializes a new instance of the StreamException class. + /// + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public StreamReaderException(String myStream, String myInfo, Exception innerException = null) : base(innerException) { Stream = myStream; Info = myInfo; - InnerException = myInnerException; if(InnerException != null) _msg = String.Format("Error during initializing new {0} StreamReader.\n\n{1}\n\n{2}", Stream, InnerException.Message, Info); diff --git a/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/StreamWriterException.cs b/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/StreamWriterException.cs index 21534813..d9376599 100644 --- a/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/StreamWriterException.cs +++ b/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/StreamWriterException.cs @@ -29,14 +29,18 @@ public class StreamWriterException : ASonesQLGraphDBExportException { private String Stream; private String Info; - private Exception InnerException; - - public StreamWriterException(String myStream, String myInfo, Exception myInnerException) + + /// + /// Initializes a new instance of the StreamWriterException class. + /// + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public StreamWriterException(String myStream, String myInfo, Exception innerException = null) : base(innerException) { Stream = myStream; Info = myInfo; - InnerException = myInnerException; - + if(InnerException != null) _msg = String.Format("Error during initializing new {0} StreamWriter.\n\n{1}\n\n{2}", Stream, InnerException.Message, Info); else diff --git a/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/TypeDoesNotExistException.cs b/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/TypeDoesNotExistException.cs index 3f2d0f4f..c3255764 100644 --- a/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/TypeDoesNotExistException.cs +++ b/Plugins/GraphQL/SonesGQL/GraphDBExport/IGraphDBExport/ErrorHandling/TypeDoesNotExistException.cs @@ -30,7 +30,13 @@ public class TypeDoesNotExistException : ASonesQLGraphDBExportException private String Type; private String Info; - public TypeDoesNotExistException(String myType, String myInfo) + /// + /// Initializes a new instance of the TypeDoesNotExistException class. + /// + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public TypeDoesNotExistException(String myType, String myInfo, Exception innerException = null) : base(innerException) { Type = myType; Info = myInfo; diff --git a/Plugins/GraphQL/SonesGQL/GraphDBImport/IGraphDBImport/ErrorHandling/ASonesQLGraphDBImportException.cs b/Plugins/GraphQL/SonesGQL/GraphDBImport/IGraphDBImport/ErrorHandling/ASonesQLGraphDBImportException.cs index 7fc8db7b..19bf0c40 100644 --- a/Plugins/GraphQL/SonesGQL/GraphDBImport/IGraphDBImport/ErrorHandling/ASonesQLGraphDBImportException.cs +++ b/Plugins/GraphQL/SonesGQL/GraphDBImport/IGraphDBImport/ErrorHandling/ASonesQLGraphDBImportException.cs @@ -19,10 +19,17 @@ */ using sones.Library.ErrorHandling; +using System; namespace sones.Plugins.SonesGQL.DBImport.ErrorHandling { - public class ASonesQLGraphDBImportException : ASonesException + public abstract class ASonesQLGraphDBImportException : ASonesException { + /// + /// Initializes a new instance of the ASonesQLGraphDBImportException. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public ASonesQLGraphDBImportException(Exception innerException = null) : base(innerException) + {} } } diff --git a/Plugins/GraphQL/SonesGQL/GraphDBImport/IGraphDBImport/ErrorHandling/ImportFailedException.cs b/Plugins/GraphQL/SonesGQL/GraphDBImport/IGraphDBImport/ErrorHandling/ImportFailedException.cs index b547ce96..24cd04f2 100644 --- a/Plugins/GraphQL/SonesGQL/GraphDBImport/IGraphDBImport/ErrorHandling/ImportFailedException.cs +++ b/Plugins/GraphQL/SonesGQL/GraphDBImport/IGraphDBImport/ErrorHandling/ImportFailedException.cs @@ -27,16 +27,25 @@ namespace sones.Plugins.SonesGQL.DBImport.ErrorHandling { public sealed class ImportFailedException : ASonesQLGraphDBImportException { - public Exception Exception { get; private set; } public String Query { get; private set; } public Int64 Line { get; private set; } - public ImportFailedException(Exception myException) + /// + /// Initializes a new instance of the ImportFailedException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public ImportFailedException(Exception innerException = null) : base(innerException) { - Exception = myException; + } - public ImportFailedException(String myQuery, Int64 myLine) + /// + /// Initializes a new instance of the ImportFailedException class using a specified query and line. + /// + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public ImportFailedException(String myQuery, Int64 myLine, Exception innerException = null) : base(innerException) { Query = myQuery; Line = myLine; @@ -44,9 +53,9 @@ public ImportFailedException(String myQuery, Int64 myLine) public override string ToString() { - if (Exception != null) + if (InnerException != null) { - return Exception.ToString(); + return InnerException.ToString(); } else { diff --git a/Plugins/GraphQL/SonesGQL/ISonesGQLAggregate/ErrorHandling/ASonesQLAggregateException.cs b/Plugins/GraphQL/SonesGQL/ISonesGQLAggregate/ErrorHandling/ASonesQLAggregateException.cs index 584b1b7d..fd455a54 100644 --- a/Plugins/GraphQL/SonesGQL/ISonesGQLAggregate/ErrorHandling/ASonesQLAggregateException.cs +++ b/Plugins/GraphQL/SonesGQL/ISonesGQLAggregate/ErrorHandling/ASonesQLAggregateException.cs @@ -31,5 +31,11 @@ namespace sones.Plugins.SonesGQL.Aggregates.ErrorHandling /// public abstract class ASonesQLAggregateException : ASonesException { + /// + /// Initializes a new instance of the ASonesQLAggregateException class. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public ASonesQLAggregateException(Exception innerException = null) : base(innerException) + {} } } diff --git a/Plugins/GraphQL/SonesGQL/ISonesGQLAggregate/ErrorHandling/GQLAggregateArgumentException.cs b/Plugins/GraphQL/SonesGQL/ISonesGQLAggregate/ErrorHandling/GQLAggregateArgumentException.cs index 8df92710..96fdeb95 100644 --- a/Plugins/GraphQL/SonesGQL/ISonesGQLAggregate/ErrorHandling/GQLAggregateArgumentException.cs +++ b/Plugins/GraphQL/SonesGQL/ISonesGQLAggregate/ErrorHandling/GQLAggregateArgumentException.cs @@ -31,7 +31,8 @@ public sealed class GQLAggregateArgumentException : ASonesQLAggregateException /// Creates a new GQL Aggregate argument exception /// /// The info concerning the exception - public GQLAggregateArgumentException(string myInfo) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public GQLAggregateArgumentException(string myInfo, Exception innerException = null) : base(innerException) { _msg = myInfo; } diff --git a/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/ASonesQLFunctionException.cs b/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/ASonesQLFunctionException.cs index 61ba5f23..274ea69d 100644 --- a/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/ASonesQLFunctionException.cs +++ b/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/ASonesQLFunctionException.cs @@ -19,10 +19,17 @@ */ using sones.Library.ErrorHandling; +using System; namespace sones.Plugins.SonesGQL.Function.ErrorHandling { - public class ASonesQLFunctionException : ASonesException - { + public abstract class ASonesQLFunctionException : ASonesException + { + /// + /// Initializes a new instance of the ASonesQLFunctionException. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public ASonesQLFunctionException(Exception innerException = null) : base(innerException) + {} } } diff --git a/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/FunctionParameterCountMismatchException.cs b/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/FunctionParameterCountMismatchException.cs index eade0451..8850f751 100644 --- a/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/FunctionParameterCountMismatchException.cs +++ b/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/FunctionParameterCountMismatchException.cs @@ -43,7 +43,9 @@ public sealed class FunctionParameterCountMismatchException : ASonesQLFunctionEx /// The current function /// The expected count of parameters /// The current count of parameters - public FunctionParameterCountMismatchException(String myFunction, Int32 myExpectedParameterCount, Int32 myCurrentParameterCount) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public FunctionParameterCountMismatchException(String myFunction, Int32 myExpectedParameterCount, Int32 myCurrentParameterCount, Exception innerException = null) + : base(innerException) { ExpectedParameterCount = myExpectedParameterCount; CurrentParameterCount = myCurrentParameterCount; @@ -57,7 +59,8 @@ public FunctionParameterCountMismatchException(String myFunction, Int32 myExpect /// /// The expected count of parameters /// The current count of parameters - public FunctionParameterCountMismatchException(Int32 myExpectedParameterCount, Int32 myCurrentParameterCount) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public FunctionParameterCountMismatchException(Int32 myExpectedParameterCount, Int32 myCurrentParameterCount, Exception innerException = null) : base(innerException) { ExpectedParameterCount = myExpectedParameterCount; CurrentParameterCount = myCurrentParameterCount; diff --git a/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/FunctionParameterTypeMismatchException.cs b/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/FunctionParameterTypeMismatchException.cs index 328c741b..294ea155 100644 --- a/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/FunctionParameterTypeMismatchException.cs +++ b/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/FunctionParameterTypeMismatchException.cs @@ -34,7 +34,13 @@ public sealed class FunctionParameterTypeMismatchException : ASonesQLFunctionExc #region constructor - public FunctionParameterTypeMismatchException(Type myExpectedType, Type myCurrentType) + /// + /// Initializes a new instance of the FunctionParameterTypeMismatchException class. + /// + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public FunctionParameterTypeMismatchException(Type myExpectedType, Type myCurrentType, Exception innerException = null) : base(innerException) { ExpectedType = myExpectedType; CurrentType = myCurrentType; diff --git a/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/InvalidFunctionParameterException.cs b/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/InvalidFunctionParameterException.cs index 837b7f62..485321af 100644 --- a/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/InvalidFunctionParameterException.cs +++ b/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/InvalidFunctionParameterException.cs @@ -43,7 +43,9 @@ public sealed class InvalidFunctionParameterException : ASonesQLFunctionExceptio /// The function parameter name /// The expected parameter value /// The function parameter value - public InvalidFunctionParameterException(String myFunctionParameterName, Object myExpected, Object myFunctionParameterValue) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public InvalidFunctionParameterException(String myFunctionParameterName, Object myExpected, Object myFunctionParameterValue, Exception innerException = null) + : base(innerException) { FunctionParameterName = myFunctionParameterName; FunctionParameterValue = myFunctionParameterValue; diff --git a/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/UnknownFunctionException.cs b/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/UnknownFunctionException.cs index 2ff94a90..c25e597e 100644 --- a/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/UnknownFunctionException.cs +++ b/Plugins/GraphQL/SonesGQL/ISonesGQLFunction/ErrorHandling/UnknownFunctionException.cs @@ -27,21 +27,15 @@ namespace sones.Plugins.SonesGQL.Function.ErrorHandling /// public sealed class UnknownFunctionException : ASonesQLFunctionException { - /// - /// The exception that has been thrown - /// - public Exception ThrownException { get; private set; } - #region constructor /// /// Creates a new UnknownFunctionException exception /// - /// - public UnknownFunctionException(Exception e) + /// The exception that is the cause of the current exception, this parameter can be NULL. + public UnknownFunctionException(Exception innerException = null) : base(innerException) { - ThrownException = e; - _msg = "An unknown function error has occurred."; + _msg = "An unknown function error has occurred. See InnerException for details"; } #endregion diff --git a/Plugins/Index/ISonesIndex/ErrorHandling/ASonesIndexException.cs b/Plugins/Index/ISonesIndex/ErrorHandling/ASonesIndexException.cs index 79f716fa..dfd5b206 100644 --- a/Plugins/Index/ISonesIndex/ErrorHandling/ASonesIndexException.cs +++ b/Plugins/Index/ISonesIndex/ErrorHandling/ASonesIndexException.cs @@ -29,6 +29,19 @@ namespace sones.Plugins.Index.ErrorHandling { public class ASonesIndexException : ASonesException { - protected ASonesIndexException(Exception innerException = null) : base(innerException) { } + /// + /// Initializes a new instance of the ASonesIndexException. + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + protected ASonesIndexException(Exception innerException = null) : this(null, innerException) + {} + + /// + /// Initializes a new instance of the ASonesIndexException using a specified message + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + protected ASonesIndexException(String message, Exception innerException = null) : base(innerException) + {} } } \ No newline at end of file diff --git a/Plugins/Index/ISonesIndex/ErrorHandling/UniqueIndexConstraintException.cs b/Plugins/Index/ISonesIndex/ErrorHandling/UniqueIndexConstraintException.cs index 88e3c859..2a4859fa 100644 --- a/Plugins/Index/ISonesIndex/ErrorHandling/UniqueIndexConstraintException.cs +++ b/Plugins/Index/ISonesIndex/ErrorHandling/UniqueIndexConstraintException.cs @@ -36,7 +36,12 @@ public sealed class UniqueIndexConstraintException : ASonesIndexException #region Constructor - public UniqueIndexConstraintException(String myInfo) + /// + /// Initializes a new instance of the UniqueIndexConstraintException. + /// + /// + /// The exception that is the cause of the current exception, this parameter can be NULL. + public UniqueIndexConstraintException(String myInfo, Exception innerException = null) : base(innerException) { Info = myInfo; } diff --git a/Plugins/Index/ISonesIndex/ErrorHandling/UnknownIndexException.cs b/Plugins/Index/ISonesIndex/ErrorHandling/UnknownIndexException.cs index e15e92b4..82e6196d 100644 --- a/Plugins/Index/ISonesIndex/ErrorHandling/UnknownIndexException.cs +++ b/Plugins/Index/ISonesIndex/ErrorHandling/UnknownIndexException.cs @@ -27,21 +27,14 @@ namespace sones.Plugins.Index.ErrorHandling /// public sealed class UnknownIndexException : ASonesIndexException { - /// - /// The exception that has been thrown - /// - public Exception ThrownException { get; private set; } - #region constructor /// /// Creates a new UnknownIndex exception /// - /// - public UnknownIndexException(Exception e) - { - ThrownException = e; - } + /// The exception that is the cause of the current exception, this parameter can be NULL. + public UnknownIndexException(Exception innerException) : base("An unknown exception occured. See InnerException for details", innerException) + { } #endregion }