diff --git a/lib/SimpleSAML/Error/NotFound.php b/lib/SimpleSAML/Error/NotFound.php index 90142901b5dac764f94db220f83eb2046026e72f..bdd7c56f9384c89d1f41aceec26c37e4e7a2deb2 100644 --- a/lib/SimpleSAML/Error/NotFound.php +++ b/lib/SimpleSAML/Error/NotFound.php @@ -51,4 +51,18 @@ class SimpleSAML_Error_NotFound extends SimpleSAML_Error_Error { return $this->reason; } + + /** + * NotFound exceptions don't need to display a backtrace, as they are very simple and the trace is usually trivial, + * so just log the message without any backtrace at all. + * + * @param bool $anonymize Whether to anonymize the trace or not. + * + * @return array + */ + public function format($anonymize = false) { + return array( + $this->getClass().': '.$this->getMessage(), + ); + } }