Skip to content

Commit

Permalink
[GRAPHDB-499] refactored all exception constructors to also take a pa…
Browse files Browse the repository at this point in the history
…rameter for passing an inner exception
  • Loading branch information
Daniel Hampe committed Sep 23, 2011
1 parent bc18b33 commit a9d58fd
Show file tree
Hide file tree
Showing 174 changed files with 755 additions and 283 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public sealed class AggregateOrFunctionDoesNotExistException : AGraphDBException
/// Creates a new AggregateOrFunctionDoesNotExistException exception
/// </summary>
/// <param name="myAggregateOrFunctionName"></param>
public AggregateOrFunctionDoesNotExistException(String myAggregateOrFunctionName)
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public AggregateOrFunctionDoesNotExistException(String myAggregateOrFunctionName, Exception innerException = null) : base(innerException)
{
AggregateOrFunctionName = myAggregateOrFunctionName;
_msg = String.Format("The aggregate or function \"{0}\" does not exist!", AggregateOrFunctionName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,11 @@ namespace sones.GraphDB.ErrorHandling
/// </summary>
public abstract class AGraphDBAttributeException : AGraphDBException
{
/// <summary>
/// Initializes a new instance of the AGraphDBAttributeException class.
/// </summary>
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public AGraphDBAttributeException(Exception innerException = null) : base(innerException)
{}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public sealed class MandatoryConstraintViolationException : AGraphDBAttributeExc
/// Creates a new MandatoryConstraintViolationException exception
/// </summary>
/// <param name="myMandatoryConstraint">The mandatory constraint info message</param>
public MandatoryConstraintViolationException(String myMandatoryConstraint)
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public MandatoryConstraintViolationException(String myMandatoryConstraint, Exception innerException = null) : base(innerException)
{
MandatoryConstraint = myMandatoryConstraint;
_msg = String.Format("The mandatory constraint \"{0}\" was violated!", MandatoryConstraint);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ public class PropertyHasWrongTypeException : AGraphDBAttributeException
/// <param name="myPropertyName">The property that was used with the wrong type.</param>
/// <param name="myExpectedTypeName">The expected type name.</param>
/// <param name="myUnexpectedTypeName">The type name of the value.</param>
public PropertyHasWrongTypeException(String myDefiningTypeName, String myPropertyName, String myExpectedTypeName, String myUnexpectedTypeName)
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public PropertyHasWrongTypeException(String myDefiningTypeName, String myPropertyName, String myExpectedTypeName, String myUnexpectedTypeName, Exception innerException = null)
: base(innerException)
{
DefiningTypeName = myDefiningTypeName;
PropertyName = myPropertyName;
Expand All @@ -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)
/// <summary>
/// Initializes a new instance of the PropertyHasWrongTypeException class.
/// </summary>
/// <param name="myDefiningTypeName">The type that defines the property.</param>
/// <param name="myPropertyName">The property that was used with the wrong type.</param>
/// <param name="myMultiplicity"></param>
/// <param name="myExpectedTypeName">The expected type name.</param>
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public PropertyHasWrongTypeException(String myDefiningTypeName, String myPropertyName, PropertyMultiplicity myMultiplicity, String myExpectedTypeName, Exception innerException = null)
: base(innerException)
{
DefiningTypeName = myDefiningTypeName;
PropertyName = myPropertyName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,16 @@
*
*/

using System;
namespace sones.GraphDB.ErrorHandling
{
public abstract class AGraphDBObjectException : AGraphDBException
{
/// <summary>
/// Initializes a new instance of the AGraphDBObjectException class.
/// </summary>
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public AGraphDBObjectException(Exception innerException = null) : base(innerException)
{}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public sealed class DBObjectCollisionException : AGraphDBObjectException
/// Creates a new DBObjectCollisionException exception
/// </summary>
/// <param name="myOBject">The given DBObject</param>
public DBObjectCollisionException(String myOBject)
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public sealed class EdgeTypeDoesNotExistException : AGraphDBException
/// Creates a new EdgeTypeDoesNotExistException exception
/// </summary>
/// <param name="myEdgeType"></param>
public EdgeTypeDoesNotExistException(String myEdgeType)
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public EdgeTypeDoesNotExistException(String myEdgeType, Exception innerException = null) : base(innerException)
{
EdgeType = myEdgeType;
_msg = String.Format("The edgetype \"{0}\" does not exist!", EdgeType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,16 @@
*
*/

using System;
namespace sones.GraphDB.ErrorHandling
{
public abstract class AGraphDBEdgeTypeException : AGraphDBException
{
{
/// <summary>
/// Initializes a new instance of the AGraphDBEdgeTypeException class.
/// </summary>
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public AGraphDBEdgeTypeException(Exception innerException = null) : base(innerException)
{}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,19 @@ public sealed class InvalidExpressionException : AGraphDBException
/// Creates a new invalid expression exception
/// </summary>
/// <param name="myInvalidExpression">The expression that has been declared as invalid</param>
public InvalidExpressionException(IExpression myInvalidExpression)
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public InvalidExpressionException(IExpression myInvalidExpression, Exception innerException = null) : base(innerException)
{
InvalidExpression = myInvalidExpression;
}

public InvalidExpressionException(String myVertexTypeName, long myVertexID)
/// <summary>
/// Initializes a new instance of the InvalidExpressionException class using the specified vertex type name and vertex ID.
/// </summary>
/// <param name="myVertexTypeName"></param>
/// <param name="myVertexID"></param>
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public InvalidExpressionException(String myVertexTypeName, long myVertexID, Exception innerException = null) : base(innerException)
{
VertexTypeName = myVertexTypeName;
VertexID = myVertexID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public sealed class InvalidLikeOperationException : AGraphDBException
/// Creates a new like operation exception
/// </summary>
/// <param name="myInfo">A information about what went wrong</param>
public InvalidLikeOperationException(String myInfo)
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public InvalidLikeOperationException(String myInfo, Exception innerException = null) : base(innerException)
{
_msg = myInfo;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,16 @@
*
*/

using System;
namespace sones.GraphDB.ErrorHandling
{
public abstract class AGraphDBIncomingEdgeException : AGraphDBException
{
{
/// <summary>
/// Initializes a new instance of the AGraphDBIncomingEdgeException class.
/// </summary>
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public AGraphDBIncomingEdgeException(Exception innerException = null) : base(innerException)
{}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public sealed class IncomingEdgeDestinationIsInvalidException : AGraphDBIncoming
/// </summary>
/// <param name="VertexTypeName">The name of the vertex type</param>
/// <param name="myVertexAttributeName">The name of the vertex attribute </param>
public IncomingEdgeDestinationIsInvalidException(String myVertexTypeName, String myVertexAttributeName)
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public IncomingEdgeDestinationIsInvalidException(String myVertexTypeName, String myVertexAttributeName, Exception innerException = null) : base(innerException)
{
VertexAttributeName = myVertexAttributeName;
VertexTypeName = myVertexTypeName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public sealed class IncomingEdgeForNotReferenceAttributeTypesException : AGraphD
/// Creates a new IncomingEdgeForNotReferenceAttributeTypesException exception
/// </summary>
/// <param name="myVertexAttributeName">The name of the vertex attribute</param>
public IncomingEdgeForNotReferenceAttributeTypesException(String myVertexAttributeName)
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,16 @@
*
*/

using System;
namespace sones.GraphDB.ErrorHandling
{
public abstract class AGraphDBIndexException : AGraphDBException
{
{
/// <summary>
/// Initializes a new instance of the AGraphDBIndexException class.
/// </summary>
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public AGraphDBIndexException(Exception innerException = null) : base(innerException)
{}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public sealed class IndexAlreadyExistException : AGraphDBIndexException
/// Creates a new IndexAlreadyExistException exception
/// </summary>
/// <param name="myIndex">The name of the index</param>
public IndexAlreadyExistException(String myIndex)
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public IndexAlreadyExistException(String myIndex, Exception innerException = null) : base(innerException)
{
Index = myIndex;
_msg = String.Format("The index \"{0}\" already exists!", Index);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public sealed class IndexAttributeDoesNotExistException : AGraphDBIndexException
/// Creates a new IndexAttributeDoesNotExistException exception
/// </summary>
/// <param name="myIndexAttributeName">The name of the given index attribute</param>
public IndexAttributeDoesNotExistException(String myIndexAttributeName)
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public IndexAttributeDoesNotExistException(String myIndexAttributeName, Exception innerException = null) : base(innerException)
{
IndexAttributeName = myIndexAttributeName;
_msg = String.Format("The attribute \"{0}\" for the index does not exist!", IndexAttributeName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public sealed class IndexCreationException : AGraphDBIndexException
/// </summary>
/// <param name="myInvalidIndexAttribute">The name of the invalid vertex type</param>
/// <param name="myInfo"></param>
public IndexCreationException(IndexPredefinition myIndexPredef, String myInfo)
: base()
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public IndexCreationException(IndexPredefinition myIndexPredef, String myInfo, Exception innerException = null) : base(innerException)
{
Info = myInfo;
IndexPredef = myIndexPredef;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ public sealed class IndexDoesNotExistException : AGraphDBIndexException
/// </summary>
/// <param name="myIndexName"></param>
/// <param name="myIndexEdition"></param>
public IndexDoesNotExistException(String myIndexName, String myIndexEdition)
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public IndexDoesNotExistException(String myIndexName, String myIndexEdition, Exception innerException = null) : base(innerException)
{
IndexName = myIndexName;
IndexEdition = myIndexEdition;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
/// <summary>
/// Initializes a new instance of the IndexRemoveException class.
/// </summary>
/// <param name="myName"></param>
/// <param name="myEdition"></param>
/// <param name="myInfo"></param>
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public IndexRemoveException(String myName, String myEdition, string myInfo, Exception innerException = null) : base(innerException)
{
Name = myName;
Edition = myEdition;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public sealed class IndexTypeDoesNotExistException : AGraphDBIndexException
/// Creates a new IndexTypeDoesNotExistException exception
/// </summary>
/// <param name="myIndexTypeName"></param>
public IndexTypeDoesNotExistException(String myType, String myIndexName)
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public IndexTypeDoesNotExistException(String myType, String myIndexName, Exception innerException = null) : base(innerException)
{
IndexName = myIndexName;
TypeName = myType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public sealed class IndexUniqueConstrainViolationException : AGraphDBIndexExcept
/// </summary>
/// <param name="myTypeName">The name of the given type</param>
/// <param name="myIndexName">The name of the given index</param>
public IndexUniqueConstrainViolationException(String myTypeName, String myIndexName)
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public IndexUniqueConstrainViolationException(String myTypeName, String myIndexName, Exception innerException = null) : base(innerException)
{
TypeName = myTypeName;
IndexName = myIndexName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public sealed class InvalidIndexAttributeException : AGraphDBIndexException
/// </summary>
/// <param name="myInvalidIndexAttribute">The name of the invalid vertex type</param>
/// <param name="myInfo"></param>
public InvalidIndexAttributeException(String myInvalidIndexAttribute, String myInfo)
: base()
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public InvalidIndexAttributeException(String myInvalidIndexAttribute, String myInfo, Exception innerException = null) : base(innerException)
{
Info = myInfo;
InvalidAttribute = myInvalidIndexAttribute;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public sealed class RebuildIndicesFaildException : AGraphDBIndexException
/// Creates a new IndexTypeDoesNotExistException exception
/// </summary>
/// <param name="myIndexTypeName"></param>
public RebuildIndicesFaildException(IEnumerable<String> myTypes, String myInfo)
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public RebuildIndicesFaildException(IEnumerable<String> myTypes, String myInfo, Exception innerException = null) : base(innerException)
{
Info = myInfo;
TypeNames = myTypes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public sealed class InvalidQueryPlanExecutionException : AGraphDBException
/// Creates a new invalid query plan execution exception
/// </summary>
/// <param name="myInfo">A description concerning the exception</param>
public InvalidQueryPlanExecutionException(String myInfo)
/// <param name="innerException">The exception that is the cause of the current exception, this parameter can be NULL.</param>
public InvalidQueryPlanExecutionException(String myInfo, Exception innerException = null) : base(innerException)
{
Info = myInfo;
_msg = Info;
Expand Down
Loading

0 comments on commit a9d58fd

Please sign in to comment.