Skip to content

Commit 3dcbd30

Browse files
add error checking
1 parent 5af0ee4 commit 3dcbd30

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/Interface/Object_Methods/Vector_Methods.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,12 @@ function ==(A::GrB_Vector{T}, B::GrB_Vector{U}) where {T, U}
112112
C = GrB_Vector(Bool, Asize[1])
113113
op = equal_op(T)
114114

115-
GrB_eWiseMult(C, GrB_NULL, GrB_NULL, op, A, B, GrB_NULL)
115+
res = GrB_eWiseMult(C, GrB_NULL, GrB_NULL, op, A, B, GrB_NULL)
116+
117+
if res != GrB_SUCCESS
118+
GrB_free(C)
119+
error(res)
120+
end
116121

117122
if nnz(C) != Anvals
118123
GrB_free(C)
@@ -123,6 +128,10 @@ function ==(A::GrB_Vector{T}, B::GrB_Vector{U}) where {T, U}
123128

124129
GrB_free(C)
125130

131+
if typeof(result) == GrB_Info
132+
error(result)
133+
end
134+
126135
return result
127136
end
128137

0 commit comments

Comments
 (0)