- // We call SafeMarkup::format() directly here, rather than use t() since
- // we are in the middle of error handling, and we don't want t() to
- // cause further errors.
- $message = SafeMarkup::format('%type: @message in %function (line %line of %file).', $error);
+ // We use \Drupal\Component\Render\FormattableMarkup directly here,
+ // rather than use t() since we are in the middle of error handling, and
+ // we don't want t() to cause further errors.
+ $message = new FormattableMarkup('%type: @message in %function (line %line of %file).', $error);