ClientException.php

Summary
ClientException.php
ClientExceptionClientException and descendant classes as well as the canonical error definitions
ClientExceptionSubclass of PHP Exception for user or client errors.
__constructForm the exception class and log the exception
__toStringReturns a string representation of the exception object.
AuthorizationExceptionSubclass of ClientException for client exceptions caused by improper authorization.
__constructConstruct the error message
PrivateStreamExceptionA class for client exceptions caused by trying to access a notice stream which is private in nature.
__constructConstruct the error message.
NoUploadedMediaExceptionClass for a client exception caused when a POST upload does not contain a file.
__constructConstruct the error message.
RunQueueBadKeyExceptionClass for a client exception caused by an interfacing queue software not presenting a valid manager key.
__constructConstruct the error message.
__constructCreates the error message.

ClientException

ClientException and descendant classes as well as the canonical error definitions

postActiv

the micro-blogging software

Copyright

Copyright © 2016-2017, Maiyannah Bishop

Derived from code copyright various sources

  • GNU Social © 2013-2016, Free Software Foundation, Inc
  • StatusNet © 2008-2012, StatusNet, Inc

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program.  If not, see http://www.gnu.org/licenses/.

https://www.gnu.org/licenses/agpl.html

About

ClientException and descendant classes as well as the canonical error definitions

These classes represent some sort of client error, such as improper authentication credentials, or attempting to upload bad files, and the like.  Most of these can be fixed by the end user.

PHP version

Tested with PHP 7

File Authors

Web

ClientException

Subclass of PHP Exception for user or client errors.  By default, these are put into LOG_DEBUG since most client errors aren’t actually our problem, but we may need the information for this if a 3rd party app or something is acting up.

Summary
__constructForm the exception class and log the exception
__toStringReturns a string representation of the exception object.

__construct

public function __construct( $message =  null,
 $code =  CLIENT_EXCEPTION,
Exception $previous =  null,
 $severity =  LOG_DEBUG)

Form the exception class and log the exception

__toString

public function __toString()

Returns a string representation of the exception object.

AuthorizationException

Subclass of ClientException for client exceptions caused by improper authorization.

Summary
__constructConstruct the error message

__construct

public function __construct($message = null)

Construct the error message

Parameters

  • string $message Message for the exception

PrivateStreamException

A class for client exceptions caused by trying to access a notice stream which is private in nature.

Properties

  • owner - owner of the private stream
  • reader - user attempting to read the stream, may be null if not logged in
Summary
__constructConstruct the error message.

__construct

public function __construct(Profile $owner,  
Profile $reader = null)

Construct the error message.

NoUploadedMediaException

Class for a client exception caused when a POST upload does not contain a file.

Summary
__constructConstruct the error message.

__construct

public function __construct($fieldname,  
$msg = null)

Construct the error message.

RunQueueBadKeyException

Class for a client exception caused by an interfacing queue software not presenting a valid manager key.

Properties

  • qmkey - the bad key passed
Summary
__constructConstruct the error message.
__constructCreates the error message.

__construct

public function __construct($qmkey)

Construct the error message.

__construct

public function __construct()

Creates the error message.

public function __construct( $message =  null,
 $code =  CLIENT_EXCEPTION,
Exception $previous =  null,
 $severity =  LOG_DEBUG)
Form the exception class and log the exception
public function __toString()
Returns a string representation of the exception object.
public function __construct($message = null)
Construct the error message
public function __construct(Profile $owner,  
Profile $reader = null)
Construct the error message.
public function __construct($fieldname,  
$msg = null)
Construct the error message.
public function __construct($qmkey)
Construct the error message.