Not planned Catch exceptions in add-on uninstall method...

Liam W

in memoriam 1998-2020
Just a random thought I had the other day while reading the code...

Why don't you catch exceptions thrown in the add-on uninstall method? That way then uninstall process can never be blocked...

The only caveat is it'll still run if genuine errors are encountered... However you could rethrow any exceptions that aren't classed as user printable...

Anyhow, just a random idea.

Liam
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
If there's a legitimate issue with the uninstall function then the add on's tables will not be deleted, nor will data be deleted. It's much better for it to error, be reported, and be fixed. Making it error silently would result in the admin thinking the add on is deleted, when it's not.
 
If there's a legitimate issue with the uninstall function then the add on's tables will not be deleted, nor will data be deleted. It's much better for it to error, be reported, and be fixed. Making it error silently would result in the admin thinking the add on is deleted, when it's not.

Pretty much what I was thinking.

Like I said, it was just a random thought.

Crumbs, I can't delete threads...
 
We'll probably just consider this a "No Thanks" for now :)

Aside from you already being able to catch exceptions yourself and act accordingly, as stated by Daniel there's likely cases where you would legitimately the process to be halted.

There are valid reasons to catch exceptions, too, of course, but you should be in control of those when necessary.
 
Top Bottom