TGS
TGS

Reputation: 3

IDEA AutoComplete Proper Exception

I have a function(AFunction) which maybe throws XXException. I write BFunction like this

try{
    AFunction()
}catch(e:){
    // Some Code
}

When I write e:,how can IDEA complete XXException (the Most Proper Exception). I have tried ctrl+space alt+enter,they lists many Exceptions.

Thanks!

Upvotes: 0

Views: 204

Answers (1)

yole
yole

Reputation: 97328

Kotlin does not have checked exceptions. Because of that, it has no information about exceptions that AFunction may throw, and does not filter the completion list for exception classes.

Upvotes: 1

Related Questions