Error codes
Codes have the form ME-<component>-<number> and never change meaning; the
message text may. Match on the code.
| Code | Exception | Cause | What to do |
|---|---|---|---|
ME-VAL-1001 | ValidationException | An argument is invalid: an empty title, a language that is not a BCP 47 tag, a blank optional metadata value, an empty footnote, a line height outside 1.0–3.0. The context names the argument. | Fix the argument; pass null for an absent optional value. |
ME-SIO-3001 | StreamException | Writing to the output failed — a full disk, a closed connection, a sink that is not writable. | Check the destination. |
ME-SIO-3002 | StreamException | An input file (an image) could not be read. | Check the path and permissions. |
ME-SIO-3003 | StreamException | The archive would exceed a ZIP limit: an entry or the whole file over 4 GB, or more than 65,535 entries. | Split the work into volumes. |
ME-IMG-5001 | ImageException | The image is not JPEG, PNG, GIF or WebP — or it is SVG, which is refused. | Convert it. |
ME-IMG-5002 | ImageException | The image's header is damaged or truncated. | Re-export the file. |
ME-PKG-7001 | PackageException | The book was finalized with no sections. | Add at least one section. |
ME-PKG-7002 | PackageException | Something was added after finalize(). | Build a new Document. |
ME-CORE-1001 | RuntimeException | PHP is older than 8.3. | Upgrade PHP. |
Warnings that are not errors
Some problems in the text are recoverable, and the book is still written. Each is logged as a warning through the PSR-3 logger you pass, once per kind per book — a manuscript with a thousand of the same problem does not produce a thousand lines:
- text that cannot appear in XML (control characters) was removed, or invalid UTF-8 was replaced;
- a
mejiro()attribute EPUB does not carry (size=,.dropcap, an unknown word, a colour that is not#rgb/#rrggbb) was dropped, its text kept; - a link target other than http, https or mailto was written as plain text.
Without a logger, nothing is logged. Two INFO lines are always written when a logger is present — one when a book starts and one when it is finalized — and a third if no identifier was given.