Skip to content
This repository was archived by the owner on May 16, 2020. It is now read-only.

Commit a787fef

Browse files
committed
add Error Number to QueryExecutionException
1 parent b2af91f commit a787fef

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/BorderEast.ArangoDB.Client/BorderEast.ArangoDB.Client/Database/ArangoQuery.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public async Task<List<T>> ToListAsync() {
8484
var json = JsonConvert.DeserializeObject<AQLResult<T>>(result.Content);
8585

8686
if (json.Error)
87-
throw new QueryExecutionException(json.ErrorMessage);
87+
throw new QueryExecutionException(json.ErrorMessage, json.ErrorNumber);
8888

8989
return json.Result;
9090
}

src/BorderEast.ArangoDB.Client/BorderEast.ArangoDB.Client/Exception/QueryExecutionException.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ namespace BorderEast.ArangoDB.Client.Exception
66
{
77
public class QueryExecutionException : System.Exception
88
{
9-
public QueryExecutionException(string message) : base(message)
9+
public int ErrorNumber { get; private set; }
10+
public QueryExecutionException(string message, int errorNum) : base(message)
1011
{
11-
12+
ErrorNumber = errorNum;
1213
}
1314
}
1415
}

0 commit comments

Comments
 (0)