class RouiError extends Error { constructor(m: string) { super(m) this.name = 'RouiError' } } export default (scope: string, m: string) => { throw new RouiError(`[${scope}] ${m}`) } export function warn(scope: string, m: string) { console.warn(new RouiError(`[${scope}] ${m}`)) }