mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-03-22 12:33:11 -04:00
16 lines
368 B
TypeScript
Executable File
16 lines
368 B
TypeScript
Executable File
// @todo: Improve or (even better) remove this file.
|
|
|
|
import { error, warn } from './log';
|
|
|
|
export function logErrorAndReturnError(msgArr: string[]) {
|
|
const err = new Error(msgArr[0]);
|
|
error(...msgArr);
|
|
return err;
|
|
}
|
|
|
|
export function logWarningAndReturnError(msgArr: string[]) {
|
|
const err = new Error(msgArr[0]);
|
|
warn(...msgArr);
|
|
return err;
|
|
}
|