Skip to main content

Overview

For errors you catch in a try/catch block, use ErrorLogger.log() to send them to Zentien instantly via Platform Events. There is no email delay — errors appear in your dashboard in real time.

Basic usage

Method signatures

Severity levels

Examples

Basic exception logging:
With severity:
With record context:

Important notes

  • ErrorLogger is designed to never throw. If publishing the Platform Event fails for any reason, the error is silently swallowed — your calling code is never affected.
  • All logging is done asynchronously via Platform Events. There is no performance impact on the transaction that calls it.
  • If you catch an exception and also re-throw it, call ErrorLogger.log() before re-throwing.