One thing to keep in mind: if you are using the IntelliJ IDE, just a simple copy/paste of Java code can convert it to Kotlin.
Coming to your question, now. If you want to create a custom Exception, just extend Exception class like:
class TestException(message:String): Exception(message)
and throw it like:
throw TestException("Hey, I am testing it")