メインコンテンツまでスキップ

Error codes

Codes have the form ME-<component>-<number> and never change meaning; the message text may. Match on the code.

CodeExceptionCauseWhat to do
ME-VAL-1001ValidationExceptionAn 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-3001StreamExceptionWriting to the output failed — a full disk, a closed connection, a sink that is not writable.Check the destination.
ME-SIO-3002StreamExceptionAn input file (an image) could not be read.Check the path and permissions.
ME-SIO-3003StreamExceptionThe 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-5001ImageExceptionThe image is not JPEG, PNG, GIF or WebP — or it is SVG, which is refused.Convert it.
ME-IMG-5002ImageExceptionThe image's header is damaged or truncated.Re-export the file.
ME-PKG-7001PackageExceptionThe book was finalized with no sections.Add at least one section.
ME-PKG-7002PackageExceptionSomething was added after finalize().Build a new Document.
ME-CORE-1001RuntimeExceptionPHP 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.