0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/core/server/helpers
Katharina Irrgang d81bc91bd2 Error creation (#7477)
refs #7116, refs #2001

- Changes the way Ghost errors are implemented to benefit from proper inheritance
- Moves all error definitions into a single file
- Changes the error constructor to take an options object, rather than needing the arguments to be passed in the correct order.
- Provides a wrapper so that any errors that haven't already been converted to GhostErrors get converted before they are displayed.

Summary of changes:

* 🐛  set NODE_ENV in config handler
*   add GhostError implementation (core/server/errors.js)
  - register all errors in one file
  - inheritance from GhostError
  - option pattern
* 🔥  remove all error files
*   wrap all errors into GhostError in case of HTTP
* 🎨  adaptions
  - option pattern for errors
  - use GhostError when needed
* 🎨  revert debug deletion and add TODO for error id's
2016-10-06 13:27:35 +01:00
..
tpl Subscribers: router & form helpers 2016-05-11 10:28:11 +02:00
asset.js Rename confusing 'context' variables 2016-02-21 22:07:15 +00:00
author.js 🎨 source out url utils from ConfigManager (#7347) 2016-09-20 15:59:34 +01:00
body_class.js deps: lodash@4.13.1 2016-06-11 13:13:55 -06:00
content.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
date.js timezones: Always use the timezone of blog setting 2016-05-20 13:59:45 +02:00
encode.js Rename confusing 'context' variables 2016-02-21 22:07:15 +00:00
excerpt.js Rename confusing 'context' variables 2016-02-21 22:07:15 +00:00
facebook_url.js Add helpers for facebook & twitter urls 2016-05-17 16:39:58 +01:00
foreach.js 🎨 configurable logging with bunyan (#7431) 2016-10-04 16:33:43 +01:00
get.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
ghost_foot.js Remove auto-inclusion of jQuery via ghost_foot 2015-09-02 13:39:22 +01:00
ghost_head.js 🎨 change how we get and set config 2016-09-20 15:59:34 +01:00
has.js 🎨 configurable logging with bunyan (#7431) 2016-10-04 16:33:43 +01:00
image.js 🎨 source out url utils from ConfigManager (#7347) 2016-09-20 15:59:34 +01:00
index.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
is.js 🎨 configurable logging with bunyan (#7431) 2016-10-04 16:33:43 +01:00
meta_description.js Started moving meta data fetching to functions. 2016-01-23 13:58:21 -08:00
meta_title.js Started moving meta data fetching to functions. 2016-01-23 13:58:21 -08:00
navigation.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
page_url.js 🎨 configurable logging with bunyan (#7431) 2016-10-04 16:33:43 +01:00
pagination.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
plural.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
post_class.js Remove filters from theme helpers (no async) 2015-12-08 14:35:04 +00:00
prev_next.js Rename confusing 'context' variables 2016-02-21 22:07:15 +00:00
tags.js 🎨 source out url utils from ConfigManager (#7347) 2016-09-20 15:59:34 +01:00
template.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
title.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
twitter_url.js Add helpers for facebook & twitter urls 2016-05-17 16:39:58 +01:00
url.js Started moving meta data fetching to functions. 2016-01-23 13:58:21 -08:00
utils.js Update tags & foreach to respect visibility 2016-06-15 12:37:09 +01:00