Skip to content

API Exceptions MFXException

Christophe SAUVEUR edited this page Sep 29, 2024 · 1 revision

MFXException Class

chsxf\MFX\Exceptions

class MFXException extends Exception

Summary

Base exception class for all MFX code

Since 2.0

Methods

__construct

public function __construct(HttpStatusCodes $code = 'chsxf\MFX\HttpStatusCodes::badRequest', string $message = '', ?Throwable $previous = null)

Constructor

Since 2.0

Parameters

Name Type Description
$code HttpStatusCodes HTTP status code associated to the Exception (defaults to 400 Bad Request)
$message string The exception message
$previous `null Throwable`

getHttpCode

public function getHttpCode(): HttpStatusCodes

Returns the HTTP status code associated with the exception

Since 2.0

Returns

HttpStatusCodes


Clone this wiki locally