Skip to content

Commit f4caf17

Browse files
AFeuerpfeillkdvos
andauthored
Update src/utility/styles.jl
Rephrase error messages based on Lukas' suggestion Co-authored-by: Lukas Devos <[email protected]>
1 parent 0bebc30 commit f4caf17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utility/styles.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ OperatorStyle(x::OperatorStyle) = x
1414

1515
OperatorStyle(x, y) = OperatorStyle(OperatorStyle(x)::OperatorStyle, OperatorStyle(y)::OperatorStyle)
1616
OperatorStyle(::T, ::T) where {T <: OperatorStyle} = T()
17-
OperatorStyle(x::OperatorStyle, y::OperatorStyle) = throw(MethodError(OperatorStyle, (x, y)))
17+
OperatorStyle(x::OperatorStyle, y::OperatorStyle) = error("Unknown combination of operator styles $x and $y")
1818
@inline OperatorStyle(x, y, zs...) = OperatorStyle(OperatorStyle(x, y), zs...)
1919

2020
struct MPOStyle <: OperatorStyle end

0 commit comments

Comments
 (0)