feat(core): add vue flow error class
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
const productionEnvs = ['production', 'prod']
|
||||
|
||||
export class VueFlowError extends Error {
|
||||
constructor(message: string, scope?: string) {
|
||||
super(`[Vue Flow]: ${scope ? `${scope} - ` : ''}${message}`)
|
||||
}
|
||||
}
|
||||
|
||||
export const warn = (message: string, ...args: any[]) => {
|
||||
if (!productionEnvs.includes(__ENV__ || '')) {
|
||||
console.warn(`[Vue Flow]: ${message}`, ...args)
|
||||
|
||||
Reference in New Issue
Block a user