DRY up the exception handling for Plugin.load and Plugin.unload