Skip to content

Introduce formatExceptionInformation#2098

Merged
axic merged 2 commits intodevelopfrom
sourceformatter
Apr 10, 2017
Merged

Introduce formatExceptionInformation#2098
axic merged 2 commits intodevelopfrom
sourceformatter

Conversation

@axic
Copy link
Contributor

@axic axic commented Mar 29, 2017

It is also used byte StandardCompiler, hence another code duplication.

Additionally all the printExceptionInformation in the CLI could be replaced, though that seems a bit backwards.

@chriseth
Copy link
Contributor

An include seems to be missing, otherwise fine.

@axic axic force-pushed the sourceformatter branch 2 times, most recently from 1f8858e to 0a4be88 Compare March 30, 2017 10:19
@axic
Copy link
Contributor Author

axic commented Mar 30, 2017

@chriseth changed the CLI too. It is more clear and the new line is controlled by the caller.

This reminds me that some of the newlines perhaps should be removed in SourceReferenceFormatter.

for (auto const& error: stack.second.errors())
SourceReferenceFormatter::printExceptionInformation(
cerr,
cerr << SourceReferenceFormatter::formatExceptionInformation(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you move all these into a helper function that adds cerr and the newline?

Copy link
Contributor Author

@axic axic Apr 10, 2017

Choose a reason for hiding this comment

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

I could just leave them at printExceptionInformation, that does that exactly. The reason I've changed them they were more clear to follow in the file as other messages are just dumbed to cerr.

@axic axic force-pushed the sourceformatter branch from 0a4be88 to 931abd1 Compare April 10, 2017 12:05
@axic
Copy link
Contributor Author

axic commented Apr 10, 2017

@chriseth I think this can be merged

@chriseth
Copy link
Contributor

Still not compiling.

@axic axic force-pushed the sourceformatter branch from 931abd1 to a182dfe Compare April 10, 2017 13:07
@axic axic merged commit bd48f18 into develop Apr 10, 2017
@axic axic deleted the sourceformatter branch April 10, 2017 13:47
@axic axic removed the in progress label Apr 10, 2017
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.

2 participants