tp TouchPointWP TouchPointWP_Exception - TenthPres/TouchPoint-WP GitHub Wiki

tp\TouchPointWP\TouchPointWP_Exception

An Exception class.


  • Full name: \tp\TouchPointWP\TouchPointWP_Exception
  • Parent class: Exception

Properties

_debugMode

public static ?bool $_debugMode
  • This property is static.

Methods

__construct

Create an exception, and log it where it can be reported to the TouchPoint-WP Developers.

public __construct(string $message = "", int $code = 0, ?\Throwable $previous = null, mixed $devDetail = null): mixed

Parameters:

Parameter Type Description
$message string
$code int
$previous ?\Throwable
$devDetail mixed

debugLog

public static debugLog(mixed $code, mixed $file, mixed $line, mixed $message): void
  • This method is static. Parameters:
Parameter Type Description
$code mixed
$file mixed
$line mixed
$message mixed

toJson

Get this in a JSON-compatible format

public toJson(): string

toWpError

Convert this exception to a WP_Error object that can be passed through the WordPress API.

public toWpError(): \WP_Error