mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Raise Specific exception type when running into latex errors
This commit is contained in:
parent
47636686cb
commit
4f2e3456e2
1 changed files with 6 additions and 1 deletions
|
@ -92,7 +92,7 @@ def tex_to_dvi(tex_file):
|
|||
for line in file.readlines():
|
||||
if line.startswith("!"):
|
||||
log.debug(f"The error could be: `{line[2:-1]}`")
|
||||
sys.exit(2)
|
||||
raise LatexError()
|
||||
return result
|
||||
|
||||
|
||||
|
@ -134,3 +134,8 @@ def display_during_execution(message):
|
|||
yield
|
||||
finally:
|
||||
print(" " * len(to_print), end="\r")
|
||||
|
||||
|
||||
|
||||
class LatexError(Exception):
|
||||
pass
|
||||
|
|
Loading…
Add table
Reference in a new issue