I have gone through the documentation and read the examples and use cases. However, I am still struggling to understand how Finalizer
add value and what can we achieve with it that was not achievable before, for example, by using a simply try-catch-finally
statement.
Example: in the same way that we attach a finalizer to the job execution, and we check the result whenever it is finished, we could execute the ParentJobResult.SUCCESS
logic at the end of the execution logic or the ParentJobResult.UNHANDLED_EXCEPTION
in the catch block if anything is thrown.
Is the only purpose to be able to catch any exception that is not catcheable, such as assertions or TOO_MANY_SOQL_QUERIES?