ServerException.php | |
ServerException | Class for server-side exceptions in postActiv |
ServerException | Subclass of PHP Exception for server errors. |
__construct | Constructor for the exception, which by default will log the exception even if otherwise it’s caught. |
__toString | Return a string representation of the exception. |
AlreadyFulfilledException | Class for an exception when trying to do something that was probably already done. |
UnsupportedMediaException | Class for a server exception caused by handling an unsupported media type, typically through an attachment/file upload. |
UseFileAsThumbnailException | A specific variant of UnsupportedMediaException where we do not have a thumbnail generated for the given file. |
UnknownUriException | Class for server exception caused by something specifying a URI that we cannot find or reach. |
UnknownMimeExtensionException | Class for unknown MIME extension exception. |
UnknownExtensionMimeException | Class for unknown extension MIME type exception. |
NoticeSaveException | Class for a server exception caused when a notice cannot be saved. |
FileNotFoundException | Class for a server exception caused by being unable to find something we know should be stored locally. |
NoResultException | Class for an exception when a database lookup returns no results |
NoSuchUserException | Class for a server exception caused by a user lookup which fails. |
NoSuchGroupException | Class for a server exception caused by a group lookup which fails. |
NoQueueHandlerException | Class for a server exception caused by finding no queue handler for a given transport. |
NoProfileException | Parent class for an exception when a profile is missing. |
UserNoProfileException | Class for an exception when the user profile is missing |
getUser | Returns the user with a missing profile. |
GroupNoProfileException | Basically UserNoProfileException, but for groups |
getGroup | Returns the group with a missing profile. |
NoParentNoticeException | Class for a server exception caused by a notice not having a parent. |
NoAvatarException | Class for a server exception caused by not being able to find the avatar for a given user. |
NoObjectTypeException | Class for a server exception caused by a notice having no given type; most often this will happen because of an unrecognized activity verb. |
NoRouteMapException | Class for a server exception caused by not finding a route map to the given location. |
MethodNotImplementedException | Class for a server exception caused when we recognize what the client is attempting to request, but postActiv does not currently support it. |
ProfileNoAcctUriException | Class for a server exception caused by finding no URI associated with an account. |
ConfigException | Class for a server exception caused by a malformed config.php |
InvalidFilenameException | Class for a server exception caused by passing an illegal filename as a parameter. |
InvalidUriException | Class for an exception when a URL is invalid. |
PasswordHashException | Class for a server exception caused by password hashing to fail. |
FeedSubException | Class for a server exception caused by the server being unable to process a feedsub properly. |
OStatusShadowException | Exception indicating we’ve got a remote reference to a local user, not a remote user! |
WebFingerReconstructionException | Class for a server exception cause when a WebFinger acct: URI can not be constructed using the data we have in a Profile. |
Class for server-side exceptions in postActiv
the micro-blogging software
Copyright © 2016-2017, Maiyannah Bishop
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
ServerException and descendant classes as well as the canonical error definitions
These classes represent various internal server errors that ususally are not fixable by the end user.
Since most exception classes share similar internals, the particulares are only documented where there’s a significant divergence worth noting.
Tested with PHP 7
Subclass of PHP Exception for server errors. The user typically can’t fix these.
__construct | Constructor for the exception, which by default will log the exception even if otherwise it’s caught. |
__toString | Return a string representation of the exception. |
Class for an exception when trying to do something that was probably already done.
This is a common case for example when remote sites are not up to date with our database. For example subscriptions, where a remote user may be unsubscribed from our user, but they request it anyway.
This exception should be caught in a manner that lets the execution continue as if the desired action did what it was supposed to do.
Class for an exception when the user profile is missing
getUser | Returns the user with a missing profile. |
Basically UserNoProfileException, but for groups
getGroup | Returns the group with a missing profile. |
Class for a server exception caused by the server being unable to process a feedsub properly. This is probably fairly integral, but doesn’t usually stop execution, so LOG_WARNING it is. It will usually only happen when we have got the sub content, but it’s malformed in some way, so not an error per se, but definitely worth a warning.
Exception indicating we’ve got a remote reference to a local user, not a remote user!
If we can ue a local profile after all, it’s available as $e->profile. -mmn
Most of the time this can happen entirely innocently, especially with older versions of GNU social or StatusNet, but it is worth noting, so I have assigned it LOG_INFO severity. -mb
Constructor for the exception, which by default will log the exception even if otherwise it’s caught.
public function __construct( $message = null, $code = SERVER_EXCEPTION, Exception $previous = null, $severity = LOG_ERR )
Return a string representation of the exception.
public function __toString()
Returns the user with a missing profile.
protected function getUser()
Returns the group with a missing profile.
protected function getGroup()