Pipo
Pipo

Reputation: 5093

where rescue should be called in an EWF_APP to be able to close a database connection

Inheriting from WSF_FILTERED_ROUTER_EXECUTION I redefine the clean to be able to close DB Connections. But when there is an assertion failure, I don't know where to call the clean on a rescue clause. In which feature do I have to call my clean on a rescue clause??

Upvotes: 0

Views: 28

Answers (1)

Jocelyn
Jocelyn

Reputation: 703

Check WSF_EXECUTION.clean which is called after each request execution. There is also WSF_EXECUTION.execute_rescue (e: detachable EXCEPTION) .

You can redefine any of them for your purpose.

But I recommend rescuing as early as possible, this way you may be able to have a proper handling, rather than a default one.

Upvotes: 1

Related Questions