Procházet zdrojové kódy

Add some error-handling notes.

Brit Butler před 11 roky
rodič
revize
99e87c061f
1 změnil soubory, kde provedl 17 přidání a 5 odebrání
  1. 17 5
      docs/hacking.md

+ 17 - 5
docs/hacking.md

@@ -219,6 +219,23 @@ PAGE, a content type for static page support, is available as a plugin.
219 219
 
220 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 239
 ### Scripting Conveniences/Basic Install
223 240
 
224 241
 Right now, we assume that you want to set up a bare repo and use git push
@@ -241,11 +258,6 @@ This leads to the following:
241 258
    Xach's buildapp may be useful here. frog and hakyll are good points of
242 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 261
 ### Plugin Constraints
250 262
 
251 263
 There is no system for determining what plugins work together or