I have the following condition statement in Groovy:
if ( condition_1 ) {
//some actions
} else if ( condition_2 ) {
//some another actions
} else {
assert false, 'Assertion description'
}
Code Narc gives me a warning about using boolean false
constant in the assertion. I'm not sure if it is real issue, so please share your thoughts about it.
I thought about using exceptions in this code instead of assert false
but it looks too heavy (exception handling is too heavy I think) for my particular case.