hardhat
Version:
Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.
22 lines • 1.21 kB
TypeScript
/**
* Formats and logs error messages based on the category the error belongs to.
*
* For each category, we produce up to three pieces:
* - `formattedErrorMessage`: the main error message that is always displayed.
* - `showMoreInfoMessage`: an optional message that points the user at more
* info. It is only displayed when the stack trace is hidden.
* - `postErrorStackTraceMessage`: an optional message that is displayed after
* the stack trace.
*
* @param error the error to handle. Supported categories are defined in
* {@link ErrorCategory}.
* @param shouldShowStackTraces whether to show stack traces or not. If true,
* the stack trace is always shown. If false, the stack trace is only shown for
* errors of category {@link ErrorCategory.OTHER},
* {@link ErrorCategory.HH2_TO_HH3_MIGRATION}, and
* {@link ErrorCategory.CJS_TO_ESM_MIGRATION}.
* @param print the function used to print the error message, defaults to
* `console.error`. Useful for testing to capture error messages.
*/
export declare function printErrorMessages(error: Error, shouldShowStackTraces?: boolean, print?: (message: string | Error) => void): Promise<void>;
//# sourceMappingURL=error-handler.d.ts.map