We create a custom exception with the following code:
class MyCustomException: Exception {
constructor(message: String?) : super(message)
constructor(message: String?, cause: Throwable?) : super(message, cause)
}
Which are the correct methods to throw a MyCustomException exception?
In the following answer code snippets the otherException is an exception instance.