Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Exception.php

function PEAR_Exception::__toString

Converts the exception to a string (HTML or plain text)

Return value

string String representation

See also

toHtml()

toText()

File

vendor/pear/pear_exception/PEAR/Exception.php, line 363

Class

PEAR_Exception
Base PEAR_Exception Class

Code

public function __toString() {
    if (isset($_SERVER['REQUEST_URI'])) {
        return $this->toHtml();
    }
    return $this->toText();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal