UNPKG

@hi18n/core

Version:

Message internationalization meets immutability and type-safety - core runtime

26 lines (23 loc) 517 B
/** * Error level. Diagnostics less important than these levels directly go to console. * * @since 0.1.7 (`@hi18n/core`) */ /** * @since 0.1.7 (`@hi18n/core`) */ /** * By default, it just throws the error if `level === "error"` and reports in the console otherwise. * * @since 0.1.7 (`@hi18n/core`) */ export function defaultErrorHandler(e, level) { switch (level) { case "error": throw e; case "warn": console.warn(e); break; } } //# sourceMappingURL=error-handling.mjs.map