Skip to content

Commit 9e821b8

Browse files
kshyattlkdvos
andauthored
Try to improve check_spacetype error message (#415)
* Try to improve check_spacetype error message It's annoying to get little information about what the incompatible space types actually are * Update src/spaces/vectorspaces.jl Co-authored-by: Lukas Devos <ldevos98@gmail.com> --------- Co-authored-by: Lukas Devos <ldevos98@gmail.com>
1 parent 3dfc99f commit 9e821b8

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 $(type_repr.(spacetype.((x, y, z...))))"))
413413
return spacetype(x)
414414
end
415415

0 commit comments

Comments
 (0)