Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Show error message if reading stream fails #865

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

revmischa
Copy link

It's difficult to debug some errors when the only error message is "Stream yields empty buffer".

This adds stderr to the error message to make it easier to see what's going on.

Before:

Stream yields empty buffer

After:

Error converting pdf to image Error: Stream yields empty buffer
gm convert: "gs" "-q" "-dBATCH" "-dSAFER" "-dMaxBitmap=50000000" "-dNOPAUSE" "-sDEVICE=pnmraw" "-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-r200x200" "-sOutputFile=/tmp/gmKaF5ew" "--" "/tmp/gmh3XZfq" "-c" "quit" (child process quit due to signal 11).
gm convert: Request did not return an image.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant