Copied!
Instantiable
Methods
public Exception::__construct(string $message = '', int $code = 0, ?Throwable $previous = NULL)
public Exception::__toString() : string
public Exception::__wakeup()
public canUseMessageForUser() : ?bool
public static createForUnexpectedDataType(string $message, ?mixed $data, array $expectedTypes, ?string $path = NULL, bool $useMessageForUser = false, int $code = 0, ?Throwable $previous = NULL) : self
 
  • param list<string|\Stringable> $expectedTypes
  • param bool $useMessageForUser If the message passed to this exception is something that can be shown safely to your user. In other words, avoid catching other exceptions and passing their message directly to this class.
public final Exception::getCode()
public getCurrentType() : ?string
public getExpectedTypes() : ?array
 
  • return string[]|null
public final Exception::getFile() : string
public final Exception::getLine() : int
public final Exception::getMessage() : string
public getPath() : ?string
public final Exception::getPrevious() : ?Throwable
public final Exception::getTrace() : array
public final Exception::getTraceAsString() : string
Properties
protected Exception::$code = 0
protected string Exception::$file = ''
protected int Exception::$line = 0
protected Exception::$message = ''
Properties
private ?string $currentType = NULL
private ?array $expectedTypes = NULL
private ?string $path = NULL
private bool $useMessageForUser = false
Methods
public static createForUnexpectedDataType(string $message, ?mixed $data, array $expectedTypes, ?string $path = NULL, bool $useMessageForUser = false, int $code = 0, ?Throwable $previous = NULL) : self
 
  • param list<string|\Stringable> $expectedTypes
  • param bool $useMessageForUser If the message passed to this exception is something that can be shown safely to your user. In other words, avoid catching other exceptions and passing their message directly to this class.
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration