瀏覽代碼

Add some error-handling notes.

Brit Butler 11 年之前
父節點
當前提交
99e87c061f
共有 1 個文件被更改,包括 17 次插入5 次删除
  1. 17 5
      docs/hacking.md

+ 17 - 5
docs/hacking.md

219
 
219
 
220
 ## Areas for Improvement
220
 ## Areas for Improvement
221
 
221
 
222
+### Real Error Handling
223
+
224
+One reason Coleslaw's code base is so small is probably the
225
+omission of any serious error handling. Trying to debug
226
+coleslaw if there's a problem during a build is unpleasant
227
+at best, especially for anyone not coming from the lisp world.
228
+
229
+We need to start handling errors and reporting errors in ways
230
+that are useful to the user. The two most obvious areas seem to be:
231
+
232
+1. Loading of Content. If `read-content` fails to parse a file, we
233
+   should tell the user what file failed and why.
234
+2. Custom themes that try to access non-existent properties of content
235
+   do not currently error. They just wind up returning whitespace.
236
+   When the theme compiles, we should alert the user to any obvious
237
+   issues with it.
238
+
222
 ### Scripting Conveniences/Basic Install
239
 ### Scripting Conveniences/Basic Install
223
 
240
 
224
 Right now, we assume that you want to set up a bare repo and use git push
241
 Right now, we assume that you want to set up a bare repo and use git push
241
    Xach's buildapp may be useful here. frog and hakyll are good points of
258
    Xach's buildapp may be useful here. frog and hakyll are good points of
242
    inspiration here.
259
    inspiration here.
243
 
260
 
244
-We may need a fair amount of error-handling improvements to make this
245
-work well but it would be a huge improvement to user-friendliness and
246
-help "expand our audience". Did I just say that? Ugh. It will also be
247
-important to communicate this change to our users loud and clear.
248
-
249
 ### Plugin Constraints
261
 ### Plugin Constraints
250
 
262
 
251
 There is no system for determining what plugins work together or
263
 There is no system for determining what plugins work together or