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

Improve error handling #176

Merged
merged 7 commits into from Oct 30, 2014
Merged

Improve error handling #176

merged 7 commits into from Oct 30, 2014

Conversation

@ngzhian
Copy link
Contributor

@ngzhian ngzhian commented Oct 25, 2014

This is a preliminary effort on #172.
A subclass of Exception, ConfigurationError is raised whenever there is an error in reading the configuration, for now that is in 2 place:

  1. missing configuration file
  2. site_name missing in configuration

Commi 0e66b3 address the stack trace when a user interrupts mkdocs serve, printing another message instead.

@@ -0,0 +1,3 @@
class ConfigurationError(Exception):
"""Error in configuration"""
pass

This comment has been minimized.

@d0ugal

d0ugal Oct 26, 2014
Member

FYI, you don't need pass when you have a docstring - not a problem tho' :)

@d0ugal
Copy link
Member

@d0ugal d0ugal commented Oct 26, 2014

This looks good - I guess it would be good to add something in run_main which caught this exception and just printed the message? We don't really want to show the user a traceback.

@d0ugal d0ugal added this to the 0.11.0 milestone Oct 29, 2014
d0ugal added a commit that referenced this pull request Oct 30, 2014
Improve error handling
@d0ugal d0ugal merged commit 566289d into mkdocs:master Oct 30, 2014
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
@d0ugal
Copy link
Member

@d0ugal d0ugal commented Oct 30, 2014

Thanks!

@ngzhian ngzhian deleted the ngzhian:error-handling-output branch Oct 30, 2014
andy0130tw referenced this pull request in python-cm/mkdocs-commonmark Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.