Use with finally


#1

The following would be nice:

connection.use {
// …
} catch (e: UniquenessConstraintException) {
// fix it
} finally {
// other stuff
}

I know “use” is currently a function and finally and catch are (soft) keywords. Also, I’m aware that I can wrap use in a try block so this is probably not worth the trouble. Just throwing the idea out there to see what you folks think.


#2

Use is meant to omit finally and catch. If you need finally and catch well use it the classic way with a try block instead