Better error warnings?
moT01 opened this issue · 2 comments
I am realizing that my tutorials may be hundreds of lessons long. This makes for a very large markdown file. If I, or anyone, mistypes something - like forgetting a space when I want to omit the "short description", I get a generic error message...
TypeError: Cannot read property '0' of null
at removeHash (/Users/tom/Documents/coderoad-tutorial-parser/tutorial-parser.js:6:58)
at createLevel (/Users/tom/Documents/coderoad-tutorial-parser/tutorial-parser.js:98:19)
at parseTutorial (/Users/tom/Documents/coderoad-tutorial-parser/tutorial-parser.js:160:30)
at Object.<anonymous> (/Users/tom/Documents/coderoad-tutorial-parser/tutorial-parser.js:179:20)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47
I'm not having any problems, and I can handle finding an error like this. Just wanted to point it out. If the markdown file is huge, this may be challenging for some.
@moT01 is then when using the builder found here: https://github.com/coderoad/builder. We'll be testing a branch called "feature/error-messages" and hope to merge it in soon.
No, I am using the script you gave me a while ago. I haven't tried the builder yet, is the structure of the markdown basically the same?