Skip to content

Commit 8f0c04f

Browse files
committed
runtime error reporting
1 parent d65ec32 commit 8f0c04f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

redisgraph/query_result.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class ResultSetScalarTypes(object):
1515
PROPERTY_INTEGER = 3
1616
PROPERTY_BOOLEAN = 4
1717
PROPERTY_DOUBLE = 5
18+
PROPERTY_ERROR = 6
1819

1920
class QueryResult(object):
2021
LABELS_ADDED = 'Labels added'
@@ -139,6 +140,9 @@ def parse_scalar(self, cell):
139140
elif scalar_type == ResultSetScalarTypes.PROPERTY_DOUBLE:
140141
scalar = float(value)
141142

143+
elif scalar_type == ResultSetScalarTypes.PROPERTY_ERROR:
144+
raise value
145+
142146
elif scalar_type == ResultSetScalarTypes.PROPERTY_UNKNOWN:
143147
print("Unknown scalar type\n")
144148

0 commit comments

Comments
 (0)