Skip to content

Commit

Permalink
Merge pull request #46 from Farsen976/chore/improve-loggs
Browse files Browse the repository at this point in the history
chore: logs error caught on load release manager plugin
  • Loading branch information
greg0ire authored Oct 28, 2024
2 parents 982760e + fce19f2 commit 7f322f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion __tests__/core/pluginManager/ReleasePluginManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
2 changes: 1 addition & 1 deletion src/core/pluginManager/ReleasePluginManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
}

Expand Down

0 comments on commit 7f322f6

Please sign in to comment.