mirror of
https://github.com/natelandau/obsidian-metadata.git
synced 2025-11-17 17:33:40 -05:00
fix: add custom exceptions (#29)
* feat: add custom exceptions to metadata creation * refactor: utility function for finding inline metadata in content * fix: use InlineTagError for exceptions parsing inline tags * fix: improve error messages * build(deps): bump dependencies * fix: use BadParameter exception when appropriate
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
import pytest
|
||||
|
||||
from obsidian_metadata.models.exceptions import FrontmatterError
|
||||
from obsidian_metadata.models.metadata import Frontmatter
|
||||
|
||||
FRONTMATTER_CONTENT: str = """
|
||||
@@ -84,7 +85,7 @@ tags: tag
|
||||
invalid = = "content"
|
||||
---
|
||||
"""
|
||||
with pytest.raises(AttributeError):
|
||||
with pytest.raises(FrontmatterError):
|
||||
Frontmatter(fn)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user