Documentation

HordeException extends Exception
in package
implements HordeThrowable, LogThrowable Uses DetailsTrait, LogTrait

Horde base exception class.

This is the slightly more strict common ancestor of unnamespaced Horde exceptions.

New namespaced code should NOT type hint against this exception but rather against HordeThrowable. New exceptions should NOT inherit from this. They should rather inherit from \Exception or another suitable builtin and implement at least HordeThrowable and possibly add functionality or context through interfaces and accompanying traits.

Tags
author

Jan Schneider jan@horde.org

category

Horde

copyright

2008-2021 Horde LLC

license

http://www.horde.org/licenses/lgpl21 LGPL-2.1

Interfaces, Classes, Traits and Enums

HordeThrowable
The root interface from which all Horde Exceptions must descend
LogThrowable
Horde extended exception interface.

Table of Contents

$details  : string
Error details that should not be part of the main exception message, e.g. any additional debugging information.
$logged  : bool
Has this exception been logged?
$_logLevel  : int
The log level to use. A Horde_Log constant.
$extraDetails  : string
$isLogged  : bool
getDetails()  : string
Get additional details separated from the exception's message
getLogLevel()  : int
Get the log level.
isLogged()  : bool
Check if this exception has been logged.
markAsLogged()  : void
Mark this exception as already logged. This cannot be undone.
setDetails()  : void
Set additional details separated from the exception's message
setLogLevel()  : void
Sets the log level.

Properties

$details

Error details that should not be part of the main exception message, e.g. any additional debugging information.

public string $details
Tags
deprecated
3.0.0

use setDetails() and getDetails() instead.

$logged

Has this exception been logged?

public bool $logged = false
Tags
deprecated
3.0.0

Use isLogged() and markAsLogged() instead.

$_logLevel

The log level to use. A Horde_Log constant.

protected int $_logLevel = 0

Name and protected status for legacy reasons. Should rather be private.

$isLogged

private bool $isLogged = false

Methods

getDetails()

Get additional details separated from the exception's message

public getDetails() : string
Return values
string

getLogLevel()

Get the log level.

public final getLogLevel() : int
Return values
int

The Horde_Log constant for the log level.

isLogged()

Check if this exception has been logged.

public final isLogged() : bool
Return values
bool

markAsLogged()

Mark this exception as already logged. This cannot be undone.

public final markAsLogged() : void
Return values
void

setDetails()

Set additional details separated from the exception's message

public setDetails(string $details) : void
Parameters
$details : string
Return values
void

setLogLevel()

Sets the log level.

public final setLogLevel(int|string $level) : void
Parameters
$level : int|string

The log level.

Return values
void

Search results