summaryrefslogtreecommitdiffstats
path: root/lib/SimpleSAML/Error/NotFound.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/SimpleSAML/Error/NotFound.php')
-rw-r--r--lib/SimpleSAML/Error/NotFound.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/SimpleSAML/Error/NotFound.php b/lib/SimpleSAML/Error/NotFound.php
index 9014290..bdd7c56 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(),
+ );
+ }
}