Exemplo n.º 1
0
 /**
  * Returns a string representation of the exception.
  *
  * @return string The exception as a string.
  */
 public function __toString()
 {
     $result = parent::__toString();
     if (null !== $this->getSocketErrorNumber()) {
         $result .= "\nSocket error number:" . $this->getSocketErrorNumber();
     }
     if (null !== $this->getSocketErrorMessage()) {
         $result .= "\nSocket error message:" . $this->getSocketErrorMessage();
     }
     return $result;
 }
Exemplo n.º 2
0
 public function __toString()
 {
     if (!$this->getPrevious()) {
         return parent::__toString();
     }
     // PHP strangely shows the innermost exception first before the outer
     // exception message. It also has a default character limit for
     // exception message strings such that the "next" exception (this one)
     // might not even get shown, causing developers to attempt to catch
     // the inner exception instead of the actual exception because they
     // can't see the outer exception's __toString output.
     return sprintf("exception '%s' with message '%s'\n\n%s", get_class($this), $this->getMessage(), parent::__toString());
 }
 public function __toString()
 {
     return 'Socket exception: ' . parent::__toString();
 }
Exemplo n.º 4
0
 public function __toString()
 {
     return parent::__toString() . implode("\n", $this->errors);
 }