Skip to content

Commit 3608b50

Browse files
committed
Add FFmpeg version in exception traceback message
1 parent 45342a7 commit 3608b50

File tree

1 file changed

+2
-2
lines changed
  • src/torchcodec/decoders/_core

1 file changed

+2
-2
lines changed

src/torchcodec/decoders/_core/ops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ def load_torchcodec_extension():
5454
except Exception as e:
5555
# TODO: recording and reporting exceptions this way is OK for now as it's just for debugging,
5656
# but we should probably handle that via a proper logging mechanism.
57-
exceptions.append(e)
57+
exceptions.append(ffmpeg_major_version, e)
5858

5959
traceback = (
6060
"\n[start of libtorchcodec loading traceback]\n"
61-
+ "\n".join(str(e) for e in exceptions)
61+
+ "\n".join(f"FFmpeg version {v}: {str(e)}" for v, e in exceptions)
6262
+ "\n[end of libtorchcodec loading traceback]."
6363
)
6464
raise RuntimeError(

0 commit comments

Comments
 (0)