element-plus/packages/utils/error.ts
2020-08-19 15:28:01 +08:00

11 lines
227 B
TypeScript

class ElementPlusError extends Error {
constructor(m: string) {
super(m)
this.name = 'ElementPlusError: '
}
}
export default (compName: string, m: string) => {
throw new ElementPlusError(`[${compName}]: ${m}`)
}