chore(import): wrap emitted errors / warnings

This commit is contained in:
Nico Rehwaldt 2014-09-04 13:29:11 +02:00
parent 7e5f4eba14
commit 6f937cf2f3
1 changed files with 2 additions and 2 deletions

View File

@ -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);
} }
} }