fix: Improve error message when a scan fails
Also syncs somewhat better with the latest release of mkdocs-simple-plugin and corrects some typos.
This commit is contained in:
parent
6247034203
commit
53b5a7c76f
3 changed files with 7 additions and 7 deletions
|
@ -420,8 +420,7 @@ semiliterate.ensurelines
|
|||
from_file_path = os.path.join(from_directory, from_file)
|
||||
try:
|
||||
with open(from_file_path) as original_file:
|
||||
utils.log.debug(
|
||||
"mkdocs-simple-plugin: Scanning {}...".format(from_file))
|
||||
utils.log.debug(f"mkdocs-semiliterate: Scanning {from_file}...")
|
||||
# extraction = StreamExtract(
|
||||
extraction = StreamInclusion(
|
||||
input_stream=original_file,
|
||||
|
@ -432,7 +431,8 @@ semiliterate.ensurelines
|
|||
patterns=self.patterns,
|
||||
**kwargs)
|
||||
return extraction.extract()
|
||||
except BaseException:
|
||||
utils.log.error("mkdocs-simple-plugin: could not build {}".format(
|
||||
from_file_path))
|
||||
except BaseException as error:
|
||||
utils.log.error(
|
||||
f"mkdocs-semiliterate: could not build {from_file_path}:\n "
|
||||
+ str(error))
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue