chore(import): wrap emitted errors / warnings
This commit is contained in:
parent
7e5f4eba14
commit
6f937cf2f3
|
@ -42,11 +42,11 @@ function importBpmnDiagram(diagram, definitions, done) {
|
||||||
// import
|
// import
|
||||||
walker.handleDefinitions(definitions);
|
walker.handleDefinitions(definitions);
|
||||||
|
|
||||||
eventBus.fire('import.success', warnings);
|
eventBus.fire('import.success', { warnings: warnings });
|
||||||
|
|
||||||
done(null, warnings);
|
done(null, warnings);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
eventBus.fire('import.error', e);
|
eventBus.fire('import.error', { error: e });
|
||||||
done(e);
|
done(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue