@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
at recaptime-dev/main 34 lines 1.0 kB view raw
1<?php 2 3/** 4 * These exceptions are raised when a client submits a malformed request. 5 * 6 * These errors are caught by Aphront itself and occur too early or too 7 * fundamentally in request handling to allow the request to route to a 8 * controller or survive to normal processing. 9 * 10 * These exceptions can be made "unlogged", which will prevent them from being 11 * logged. The intent is that errors which are purely the result of client 12 * failure and of no interest to the server can be raised silently to avoid 13 * cluttering the logs with client errors that are not actionable. 14 */ 15final class AphrontMalformedRequestException extends AphrontException { 16 17 private $title; 18 private $isUnlogged; 19 20 public function __construct($title, $message, $unlogged = false) { 21 $this->title = $title; 22 $this->isUnlogged = $unlogged; 23 parent::__construct($message); 24 } 25 26 public function getTitle() { 27 return $this->title; 28 } 29 30 public function getIsUnlogged() { 31 return $this->isUnlogged; 32 } 33 34}