UNPKG

@contract-case/case-plugin-base

Version:

Plugin framework for writing plugins for the ContractCase test framework

32 lines 1.25 kB
import type { LogLevelContext } from '../context/types'; import { ConfigurationErrorCode } from './ErrorCodes'; /** * Indicates that the user has configured ContractCase incorrectly. * * Throw this during mock setup if you encounter configuration errors. * * @public */ export declare class CaseConfigurationError extends Error { /** * The error code to help the user debug this */ contractCaseErrorCode: ConfigurationErrorCode; /** * If there's a user facing stack trace, this will be set to a non-empty string. * * The stack trace will have multiple lines separated by '\\n' */ userFacingStackTrace: string; /** * Constructs a CaseConfigurationError. * * @param message - the message for this error * @param context - the match context, used to add '(at $location)' to the * message. You can also pass 'DONT_ADD_LOCATION' if you don't want to append * this to the message. * @param code - an optional ConfigurationErrorCode to aid the user in debugging. */ constructor(message: string, context: LogLevelContext | 'DONT_ADD_LOCATION', code?: ConfigurationErrorCode, userFacingStackTrace?: string); } //# sourceMappingURL=CaseConfigurationError.d.ts.map