Skip to content

Commit

Permalink
fix(errors): add error "UnknownVersionError"
Browse files Browse the repository at this point in the history
  • Loading branch information
hasezoey committed Jan 17, 2023
1 parent da12f93 commit 5676931
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/mongodb-memory-server-core/src/util/errors.ts
Expand Up @@ -186,5 +186,14 @@ export class UnexpectedCloseError extends Error {
}
}

/**
* Error for when VERSION fails to coerce to a semver version but is required
*/
export class UnknownVersionError extends Error {
constructor(public version: string) {
super(`Could not corece VERSION to a semver version (version: "${version}")`);
}
}

/* Custom Generic Error class for MMS */
export class GenericMMSError extends Error {}

0 comments on commit 5676931

Please sign in to comment.