From 41018d45740414c51c8e6249a27414d44a2a7e84 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Fri, 17 Mar 2023 18:56:53 +0000 Subject: [PATCH] Don't absorb error messages on Caption Syntax Errors --- devine/core/tracks/subtitle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devine/core/tracks/subtitle.py b/devine/core/tracks/subtitle.py index 70dee68..6310d3a 100644 --- a/devine/core/tracks/subtitle.py +++ b/devine/core/tracks/subtitle.py @@ -178,8 +178,8 @@ class Subtitle(Track): replace("\n\n<", "\n<") captions: pycaption.CaptionSet = pycaption.WebVTTReader().read(text) return captions - except pycaption.exceptions.CaptionReadSyntaxError: - raise SyntaxError(f"A syntax error has occurred when reading the \"{codec}\" subtitle") + except pycaption.exceptions.CaptionReadSyntaxError as e: + raise SyntaxError(f"A syntax error has occurred when reading the \"{codec}\" subtitle: {e}") except pycaption.exceptions.CaptionReadNoCaptions: return pycaption.CaptionSet({"en": []})