Skip to content

Commit 95abb9b

Browse files
authored
Try to improve check_spacetype error message
It's annoying to get little information about what the incompatible space types actually are
1 parent 3dfc99f commit 95abb9b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/spaces/vectorspaces.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ while the second will return the spacetype if all types are equal, and throw a [
409409
"""
410410
check_spacetype(::Type{Bool}, x, y, z...) = _allequal(spacetype, (x, y, z...))
411411
@noinline function check_spacetype(x, y, z...)
412-
check_spacetype(Bool, x, y, z...) || throw(SpaceMismatch("incompatible space types"))
412+
check_spacetype(Bool, x, y, z...) || throw(SpaceMismatch(lazy"incompatible space types ($(map(spacetype, (x, y, z...))))"))
413413
return spacetype(x)
414414
end
415415

0 commit comments

Comments
 (0)