thanks! but this still isn't ideal
It causes a problem when I don't put the message = there. It would ask for a Throwable instance
b
bezrukov
12/04/2019, 6:01 PM
because JvmOverloads generates constructor per default parameters prefix.
In case above it generates four constructors
()
(throwable)
(throwable, message)
(throwable, message, enableSupression)
bezrukov
12/04/2019, 6:03 PM
so calling
KotlinPluginException("message without named argument") is not working because there is no
(message)
constructor
bezrukov
12/04/2019, 6:07 PM
you could swap message and throwable, but then there will be no
(throwable)
constructor.
So you need just add one more constructor by hands: