adding a proper exception handler to find actual problems in external files
This commit is contained in:
parent
1de0e13e45
commit
6f51fbf76c
1 changed files with 5 additions and 2 deletions
|
@ -13,7 +13,7 @@ actual values are kept in YAML files in order to version them with git.
|
|||
from argparse import ArgumentParser
|
||||
import yaml
|
||||
import string
|
||||
import os
|
||||
import os,sys
|
||||
|
||||
from tablegenerator import TableGenerator
|
||||
from markdowngenerator import MarkdownGenerator
|
||||
|
@ -145,7 +145,10 @@ class CourseBuilder:
|
|||
mod_path = os.path.join(os.path.dirname(bookpath),m)
|
||||
|
||||
with open(mod_path) as fm:
|
||||
self.process(yaml.load(fm,Loader=yaml.Loader),fields=actual_fields,lang=lang,pagebreak=pagebreak,createTitle=create_title,header_level=header_level)
|
||||
try:
|
||||
self.process(yaml.load(fm,Loader=yaml.Loader),fields=actual_fields,lang=lang,pagebreak=pagebreak,createTitle=create_title,header_level=header_level)
|
||||
except:
|
||||
print(f'Error in {mod_path}',file=sys.stderr)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue