Skip to content

Added the error message to the failure cases. #76

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

Closed

Conversation

derickr
Copy link
Contributor

@derickr derickr commented Aug 5, 2015

This makes it much easier to debug what goes wrong, en-masse. In my case, I already found a "FIXME ADD EXCEPTION" instead of having to debug what the f goes on :-)

This makes it much easier to debug what goes wrong, en-masse.
@bjori
Copy link
Contributor

bjori commented Aug 5, 2015

Could you have it trim newlines?
There are unfortunately messages generated by external components that have newlines in them (a lot of them even) :(

@bjori
Copy link
Contributor

bjori commented Aug 5, 2015

lgtm after that

}
return $e->getMessage();
}
printf("OK: Got %s\n", $exceptionname);
} else {
printf("ALMOST: Got %s - expected %s\n", get_class($e), $exceptionname);
printf("ALMOST: Got %s - expected %s: %s\n", get_class($e), $exceptionname, $e->getMessage());
Copy link
Member

Choose a reason for hiding this comment

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

@bjori: Are you asking for an rtrim() (or rtrim("\r\n")) call on the exception message parameters to printf()? If so, I can make that change tomorrow morning and merge this.

Copy link
Contributor

Choose a reason for hiding this comment

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

No ... That will only trim trailing new lines, not in the middle of the message

Copy link
Member

Choose a reason for hiding this comment

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

What components are creating messages with newlines (not sure I've seen those before).

And a second question: is this just to allow %s in EXPECTF blocks, instead of requiring multi-line catch-alls?

Copy link
Contributor

Choose a reason for hiding this comment

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

SSL, SASL, and I think mongoc compounds some error message somewhere, although its been a while so maybe not.

Its about being all in one line yes, so you can differentiate what is coming from what in the output.

jmikola added a commit that referenced this pull request Aug 14, 2015
@jmikola
Copy link
Member

jmikola commented Aug 14, 2015

Manually merged in 2aa5329.

Newline stripping added in e333fc0.

@jmikola jmikola closed this Aug 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants