Block
I finally will always be executed regardless of any exception thrown.
If this is your complete code, then this is normal. If not, I recommend some kind of zero checking before writing variable messages, since it cannot be initialized when an exception is thrown.
I think that registration like this is completely fair.
EDIT:
I forgot to mention that there are some corner cases that will not allow final execution - that I do not think this is your case, but worth mentioning (thanks Simon for pointing out!).
Also, I like the finally approach if you want your method to register, even if your method returns.
source share