Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standard err serializer: better support for caused errors #200

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Standard err serializer: better support for caused errors #200

wants to merge 3 commits into from

Conversation

acarstoiu
Copy link

I've made some tiny changes that make the default err serializer support a wider range of caused errors, namely also those that have a cause property. I have also changed a little bit the connecting message in the full error stack to integrate better with the default stack trace formatter.

Thank you.

I've made some tiny changes that make the default `err` serializer support a wider range of caused errors, namely also those that have a `cause` property. I have also changed a little bit the connecting message in the full error stack to integrate better with the default stack trace formatter.

Thank you.
cex = ex.cause();
}
if (typeof (ex.cause) === 'object') {
cex = ex.cause;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps else if here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, it could even be a switch statement.

@trentm
Copy link
Owner

trentm commented Jan 18, 2015

Thanks for the PR! And sorry for the delay in responding. I have a couple small Qs above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants