is there something like `TODO("reason")` but meant...
# getting-started
k
is there something like
TODO("reason")
but meant just for unreachable `if`/`when` branches? (for example like Rust has
unreachable!
macro do designate code paths that can't be taken)
d
throw IllegalStateException("description of why this is an illegal state")
is what I do usually.
k
I think I'll do that... that's what
error("reason")
does, right?
1
d
Yes! I didn't even know about that one
m
we usually go for the more specific throwing of illegalstate/arguments, but error("reason") is fine too
n
I usually use AssertionError for branches that are truly unreachable