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

Tighten up error messages. #3189

Merged
merged 1 commit into from Oct 5, 2016
Merged

Conversation

bangerth
Copy link
Member

@bangerth bangerth commented Oct 4, 2016

It has long annoyed me that when we print exception messages that were created
via ExcMessage, that the information is really duplicative. Example:


An error occurred in line <710> of file <.../step-6.cc> in function
int main()
The violated condition was:
false
The name and call sequence of the exception was:
ExcMessage ("abc" "def")
Additional Information:
abcdef

Stacktrace:

#0 ./step-6: main


Here, the text that comes after 'The name and call sequence...'
is duplicative with what comes after 'Additional Information:'.

This is specifically the case for ExcMessage errors because
there everything that constructs the 'Additional information'
will actually be also under 'The name and...' part.

This patch cleans this up by omitting the first of these two
parts if the error message was created via ExcMessage.

It has long annoyed me that when we print exception messages that were created
via ExcMessage, that the information is really duplicative. Example:

--------------------------------------------------------
An error occurred in line <710> of file <.../step-6.cc> in function
    int main()
The violated condition was:
    false
The name and call sequence of the exception was:
    ExcMessage ("abc" "def")
Additional Information:
abcdef

Stacktrace:
-----------
#0  ./step-6: main
--------------------------------------------------------

Here, the text that comes after 'The name and call sequence...'
is duplicative with what comes after 'Additional Information:'.

This is specifically the case for ExcMessage errors because
there *everything* that constructs the 'Additional information'
will actually be also under 'The name and...' part.

This patch cleans this up by omitting the first of these two
parts if the error message was created via ExcMessage.
@tjhei
Copy link
Member

tjhei commented Oct 4, 2016

I like it! Did you check that no test breaks because of this change?

@bangerth
Copy link
Member Author

bangerth commented Oct 4, 2016

Yes, I verified that the middle part of the message is gone and that no tests fail.

@bangerth
Copy link
Member Author

bangerth commented Oct 4, 2016

Could be assumed to be part of #610.

@tjhei tjhei merged commit f1464f1 into dealii:master Oct 5, 2016
@bangerth bangerth deleted the fix-error-message branch October 5, 2016 12:40
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.

None yet

2 participants