/// <summary> /// Creates a new GqlSyntaxException exception /// </summary> /// <param name="mySyntaxError">The parser message from Irony (contains a message from kind of info, warning or error)</param> /// <param name="myQuery">The given query</param> public GQLStatementNodeExecutionException(String myQuery, AStatement myStatement, String myInfo, ASonesException myInnerException = null) { 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 _msg = String.Format("Error during execute statement: [{0}]\n\n in query: [{1}]\n\n{2}\n\n{3}", Statement.StatementName, Query, Info, InnerException.Message); }
/// <summary> /// Creates a new AggregateOrFunctionDoesNotExistException exception /// </summary> public AggregateOrFunctionDoesNotExistException(Type myAggrOrFuncType, String myAggrOrFuncName, String myInfo, ASonesException myException = null) { Info = myInfo; Exception = myException; AggrOrFuncType = myAggrOrFuncType; AggrOrFuncName = myAggrOrFuncName; if (Exception != 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); else _msg = String.Format("Error during loading the aggregate plugin of type: [{0}] name: [{1}]\n\n{2}", myAggrOrFuncType.ToString(), myAggrOrFuncName, myInfo); } }
public static QueryResult Failure(String myQuery, String myQLName, ASonesException myError, IEnumerable<IVertexView> myVertices = null, UInt64 myDuration = 0UL) { return new QueryResult(myQuery, myQLName, myDuration, ResultType.Failed, myVertices, myError); }
/// <summary> /// Creates a new query result /// </summary> /// <param name="myQuery">The query that has been executed</param> /// <param name="myQLName">The name of the query language that has been executed</param> /// <param name="myDuration">The time that was spent on executing the query</param> /// <param name="myVertices">The vertices that should be available within the query result</param> /// <param name="myError">The error which occured during execution</param> public QueryResult(String myQuery, String myQLName, UInt64 myDuration, ResultType myResultType, IEnumerable<IVertexView> myVertices, ASonesException myError) { TypeOfResult = myResultType; Vertices = myVertices ?? new List<IVertexView>(); Query = myQuery; NameOfQuerylanguage = myQLName; Duration = myDuration; Error = myError; }