Skip to content

Commit

Permalink
feat: 📝 Add missing doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pklaschka committed Oct 29, 2024
1 parent 1ff6493 commit d22425e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ import { getLogger } from "@std/log";
*/
export class EnvNotSetError extends Error {
/**
* Create a new {@link EnvNotSetError}.
*
* Use this when an environment variable is not set and the application tries to access it.
*
* @param envVariable name of the environment variable
* @param cause the cause of the error, if any
*/
constructor(public readonly envVariable: string, cause?: unknown) {
super(
Expand Down Expand Up @@ -118,6 +123,12 @@ export async function initVariable(
* this error shall be thrown when reading the file at the path specified by `pathVariable` fails.
*/
export class ConfigFileReadError extends Error {
/**
* Create a new {@link ConfigFileReadError}.
* @param envVariable the name of the environment variable
* @param pathVariable the name of the environment variable that specifies the path to the file
* @param cause the cause of the error
*/
constructor(
public readonly envVariable: string,
public readonly pathVariable: string,
Expand Down

0 comments on commit d22425e

Please sign in to comment.