INNER CODE UNIT · TypeScript

MissingArgumentException

tenseijs/tensei · packages/cli/src/Exceptions/index.ts:17

export class MissingArgumentException extends Exception {
  public command?: CommandConstructorContract
  public argumentName: string = ''

  /**
   * A required argument is missing
   */
  public static invoke(
    name: string,
    command: CommandConstructorContract
  ): MissingArgumentException {
    const exception = new this(
      `Missing required argument "${name}"`,
      500,
      'E_MISSING_ARGUMENT'
    )

    exception.argumentName = name

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…