Adding exception handling to the plugin system