Skip to content

Commit 1b9b551

Browse files
authored
check error code on basic_subs too
1 parent 97ddc7a commit 1b9b551

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/subs.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ function subs(ex::T, var::S, val) where {T<:SymbolicType, S<:SymbolicType}
2424
end
2525
function subs(ex::T, d::CMapBasicBasic) where T<:SymbolicType
2626
s = Basic()
27-
ccall((:basic_subs, libsymengine), Nothing, (Ref{Basic}, Ref{Basic}, Ptr{Cvoid}), s, ex, d.ptr)
27+
err_code = ccall((:basic_subs, libsymengine), Cuint, (Ref{Basic}, Ref{Basic}, Ptr{Cvoid}), s, ex, d.ptr)
28+
throw_if_error(err_code, ex)
2829
return s
2930
end
3031

0 commit comments

Comments
 (0)