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.
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:
After: