Jump to main content Jump to doc navigation

modX::messageQuit

Deprecated since 2.2.0 — use modX::log() with modX::LOG_LEVEL_FATAL instead.

Concatenates the parameters into one message and logs it as fatal. A fatal message always reaches sendError('fatal'), which prints the error page and stops execution. The method returns nothing.

Syntax

void messageQuit ([string $msg = 'unspecified error'], [string $query = ''], [bool $is_error = true], [string $nr = ''], [string $file = ''], [string $source = ''], [string $text = ''], [string $line = ''])
  • $msg (string) message text, by default 'unspecified error'
  • $query (string) query printed next to the message, by default ''
  • $is_error (bool) unused by the body, by default true
  • $nr (string) error number, by default ''
  • $file (string) source file, by default ''
  • $source (string) source snippet, by default ''
  • $text (string) extra text, by default ''
  • $line (string) source line, by default ''

Example

$modx->messageQuit('Could not save record', "UPDATE staff SET name = 'foobar'", true, '1062');

See Also

Support the team building MODX with a monthly donation.

The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.

Backers

  • modmore
  • STERC
  • Digital Penguin
  • Jens Wittmann – Gestaltung & Entwicklung
  • CrewMark
  • Fabian Christen
  • Sepia River Studios
  • Dannevang Digital
  • Alex
  • A. Moreno
  • Chris Fickling
  • Stéphane Jäggi
  • Murray Wood
  • Anton Tarasov
  • JT Skaggs
  • deJaya
  • Lefthandmedia
  • eydolan
  • Following Sea
  • Guido Gallenkamp
  • YJ
  • Raffy
  • Snow Creative
  • Nick Clark
  • Guest
  • Helen
  • krisznet
  • Yanni
  • Richard

Budget

$194 per month—let's make that $500!

Learn more