mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-11-30 10:18:02 +08:00
15 lines
326 B
TypeScript
15 lines
326 B
TypeScript
class ElementPlusError extends Error {
|
|
constructor(m: string) {
|
|
super(m)
|
|
this.name = 'ElementPlusError'
|
|
}
|
|
}
|
|
|
|
export default (scope: string, m: string) => {
|
|
throw new ElementPlusError(`[${scope}] ${m}`)
|
|
}
|
|
|
|
export function warn(scope: string, m: string) {
|
|
console.warn(new ElementPlusError(`[${scope}] ${m}`))
|
|
}
|