element-plus/packages/utils/error.ts

11 lines
227 B
TypeScript
Raw Normal View History

2020-08-19 11:05:40 +08:00
class ElementPlusError extends Error {
constructor(m: string) {
super(m)
this.name = 'ElementPlusError: '
}
}
export default (compName: string, m: string) => {
throw new ElementPlusError(`[${compName}]: ${m}`)
}