From 6f20913e4a9b9b996e98f343fba366d0ee10f8d7 Mon Sep 17 00:00:00 2001 From: Max P Date: Thu, 22 Aug 2024 20:33:48 +0200 Subject: [PATCH] Update DependencyResolutionError to use Identifier type - Import `Identifier` from `src/types/Identifier` - Change `identifier` parameter type in `DependencyResolutionError` constructor from `string` to `Identifier` - Update error message to call `identifier.toString()` --- src/interfaces/Exceptions.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/interfaces/Exceptions.ts b/src/interfaces/Exceptions.ts index ba6c46e..e638422 100644 --- a/src/interfaces/Exceptions.ts +++ b/src/interfaces/Exceptions.ts @@ -1,3 +1,4 @@ +import { Identifier } from 'src/types/Identifier'; import { ITSinjex } from './ITSinjex'; /** @@ -23,8 +24,8 @@ export class DependencyResolutionError extends TSinjexError { * Creates a new instance of {@link DependencyResolutionError} * @param identifier **The identifier of the dependency** */ - constructor(identifier: string) { - super(`Dependency ${identifier} could not be resolved.`); + constructor(identifier: Identifier) { + super(`Dependency ${identifier.toString()} could not be resolved.`); this.name = 'TSinjexResolutionError'; } }