Skip to content

Uncaught Exception handling #93

@OrH

Description

@OrH

Hey,

Is there a specific reason for emitting uncaughtException to the process instead of returning as an error in the callback?

https://github.com/thenativeweb/node-cqrs-eventdenormalizer/blob/master/lib/definitions/viewBuilder.js#L94

    try {
      unwrappedDenormFn.call(this, evtData, vm, wrappedCallback.bind(this));
    } catch (e) {
      debug(e);
      process.emit('uncaughtException', e); // Why not do - wrappedCallback.apply(this, [e]);
    }

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions