catch compile errors, return PluginError