Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

chore: prettify error message of duplicated plugin

Wenzhao Huc4dddc58fc3f
diff --git a/packages/core/src/services/plugin/plugin.service.ts b/packages/core/src/services/plugin/plugin.service.ts
index 4116cb7599..5633b82504 100644
--- a/packages/core/src/services/plugin/plugin.service.ts
+++ b/packages/core/src/services/plugin/plugin.service.ts
@@ -131,7 +131,7 @@ export class PluginService implements IDisposable {
}
if (this._seenPlugins.has(pluginName)) {
- throw new Error(`[PluginService]: duplicate plugin name for "${pluginName}".`);
+ throw new Error(`[PluginService]: duplicate plugin name for "${pluginName}". Maybe a plugin that dependents on "${pluginName} has already registered it. In that case please register "${pluginName}" before the that plugin.`);
}
this._seenPlugins.add(ctor.pluginName);