codesamplex

Ejemplo

Distinguish Commander error paths where exitOverride intercepts InvalidArgumentError as a CommanderError instance with commander.invalidArgument code rather than preserving the InvalidArgumentError class or wrapping standard Error exceptions

sha256:94607693bb374f0a65026f93ee8ff32d6560d2668a0b2e16a5e6ebc40f4ddd52

PUBLISHED L3_CONTRACT_PASS MIT-0

Caso

Objetivo
Distinguish Commander error paths where exitOverride intercepts InvalidArgumentError as a CommanderError instance with commander.invalidArgument code rather than preserving the InvalidArgumentError class or wrapping standard Error exceptions HOW
Paquetes
commander 13.1.0
Entorno
node
Creado
2026-08-16T16:19:04Z

Lo que suele suponerse

Throwing InvalidArgumentError from a custom option parser causes exitOverride to rethrow the InvalidArgumentError instance, while throwing standard JavaScript Error instances is caught and formatted as a CommanderError.

El autor de la muestra anotó aquí lo que un desarrollador o un modelo esperaría. El contrato de abajo es lo que realmente se ejecutó.

Contrato

Archivos

Descargar el artefacto verificado (tar.gz): los bytes exactos con los que se ejecutó el contrato

Seeder de origen

csx-seed

Recibos de verificación