hugo/hugolib
Bjørn Erik Pedersen 3f0f7eed68 Improve error handling in commands
Cobra, the CLI commander in use in Hugo, has some long awaited improvements in the error handling department.
This enables a more centralized error handling approach.

This commit introduces that by changing all the command funcs to `RunE`:

* The core part of the error logging, usage logging and `os.Exit(-1)` is now performed in one place and that one place only.
* The usage text is now only shown on invalid arguments etc. (user errors)

Fixes #1502
2015-12-02 07:07:05 -07:00
..
author.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
benchmark_test.go
datafiles_test.go
handler_base.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
handler_file.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
handler_meta.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
handler_page.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
handler_test.go
hugo.go
media.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
menu.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
menu_test.go
node.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
page.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
page_permalink_test.go
page_taxonomy_test.go
page_test.go
page_time_integration_test.go
pageCache.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
pageCache_test.go
pageGroup.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
pageGroup_test.go
pageSort.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
pageSort_test.go
pagesPrevNext.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
pagesPrevNext_test.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
pagination.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
pagination_test.go
path_separators_test.go
path_separators_windows_test.go
permalinks.go
permalinks_test.go
planner.go
redis.cn.md
rss_test.go
scratch.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
scratch_test.go
shortcode.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
shortcode_test.go
shortcodeparser.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
shortcodeparser_test.go
site.go Improve error handling in commands 2015-12-02 07:07:05 -07:00
site_show_plan_test.go
site_test.go
site_url_test.go
siteinfo_test.go
siteJSONEncode_test.go
sitemap.go
sitemap_test.go
summary.go
taxonomy.go Change the license to Apache 2.0 2015-11-23 22:16:36 -05:00
taxonomy_test.go