feat(content-build): scaffold package + Markdown yaml-block parser
This commit is contained in:
12
tools/content_build/errors.py
Normal file
12
tools/content_build/errors.py
Normal file
@@ -0,0 +1,12 @@
|
||||
"""The single failure type. Every validation/parse problem raises BuildError so
|
||||
the CLI can print a uniform 'BUILD FAILED: <what> [<id>] (<file:line>)'."""
|
||||
|
||||
|
||||
class BuildError(Exception):
|
||||
def __init__(self, message: str, source: str = "", entry_id: str = ""):
|
||||
self.message = message
|
||||
self.source = source
|
||||
self.entry_id = entry_id
|
||||
loc = f" [{entry_id}]" if entry_id else ""
|
||||
src = f" ({source})" if source else ""
|
||||
super().__init__(f"{message}{loc}{src}")
|
||||
Reference in New Issue
Block a user