The Yaf_Exception class

(Yaf >=1.0.0)

Introduction

Yaf_Exception is the base class of all exceptions thrown by Yaf. Every other Yaf exception class extends it.

It extends RuntimeException when the SPL extension is loaded, and the built-in Exception otherwise. Exceptions raised by Yaf carry an error code that identifies the type of failure.

Class synopsis

class Yaf_Exception extends RuntimeException {
/* Inherited properties */
protected string $message = "";
private string $string = "";
protected int $code;
protected string $file = "";
protected int $line;
private array $trace = [];
private ?Throwable $previous = null;
/* Methods */
public function __construct(string $message = "", int $code = 0)
public function getPrevious(): Throwable
/* Inherited methods */
final public function Exception::getMessage(): string
final public function Exception::getPrevious(): ?Throwable
final public function Exception::getCode(): int
final public function Exception::getFile(): string
final public function Exception::getLine(): int
final public function Exception::getTrace(): array
final public function Exception::getTraceAsString(): string
public function Exception::__toString(): string
private function Exception::__clone(): void
}

Table of Contents

add a note

User Contributed Notes

There are no user contributed notes for this page.