fun <T> transaction(statement: SessionWrapper.() -> T): T
A failed transaction will most likely throw an exception instance listAll MongoException. This function will safely execute a transaction and display an error log on JavaFX if it throws those exceptions.
See Also