Commit f5667953 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

Give better error messages in image-convert

* lisp/image/image-converter.el (image-convert): Make
image-convert bug out earlier on a wrong IMAGE-FORMAT value
(bug#38310).
parent 92fda5a7
Pipeline #4133 failed with stage
in 62 minutes and 47 seconds
......@@ -87,6 +87,9 @@ data is returned as a string."
(image-converter--find-converter))
(unless image-converter
(error "No external image converters available"))
(when (and image-format
(not (= (length (split-string (symbol-name image-format) "/")) 2)))
(error "IMAGE-FORMAT should be a symbol like `image/png'"))
(with-temp-buffer
(set-buffer-multibyte nil)
(when-let ((err (image-converter--convert
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment