Package onl.ycode.stormify
Interface SafeRunnable
public interface SafeRunnable
A functional interface that can be used to run code that may throw an exception.
This interface is used when defining a transaction context.
If an exception is thrown while running the code, the transaction will be rolled back.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
run()
The code inside the transaction that may throw an exception.
-
Method Details
-
run
The code inside the transaction that may throw an exception.- Throws:
Exception
- If an error occurs while running the code.
-