diff --git a/__tests__/core/pluginManager/ReleasePluginManager.test.ts b/__tests__/core/pluginManager/ReleasePluginManager.test.ts index c6ea7ac..42d5606 100644 --- a/__tests__/core/pluginManager/ReleasePluginManager.test.ts +++ b/__tests__/core/pluginManager/ReleasePluginManager.test.ts @@ -15,7 +15,7 @@ describe('pluginManager', () => { await expect(async () => ReleasePluginManager.loadReleaseManagerPlugin('invalidPath') ).rejects.toThrow( - 'Cannot load release manager plugin. Invalid path or plugin already loaded.' + "Cannot load release manager plugin. Invalid path or plugin already loaded. Reason: Error: Cannot find module 'invalidPath' from 'src/core/pluginManager/ReleasePluginManager.ts'" ); }); it('should throw an error if the plugin is already added', async () => { diff --git a/src/core/pluginManager/ReleasePluginManager.ts b/src/core/pluginManager/ReleasePluginManager.ts index e2a4591..e7ac1b9 100644 --- a/src/core/pluginManager/ReleasePluginManager.ts +++ b/src/core/pluginManager/ReleasePluginManager.ts @@ -46,7 +46,7 @@ export default class ReleasePluginManager { this.instance.releaseManagers.set(releaseManagerName, releaseManager); return releaseManager; } catch (error) { - throw new Error(errMessage); + throw new Error(`${errMessage} Reason: ${error}`); } }