summaryrefslogtreecommitdiffstats
path: root/lib/SimpleSAML
diff options
context:
space:
mode:
authorJaime Perez Crespo <jaime.perez@uninett.no>2016-04-13 13:06:05 +0200
committerJaime Perez Crespo <jaime.perez@uninett.no>2016-04-13 13:06:05 +0200
commitb4c6a6c468026edcb8f32e4bd86ded440b3871ca (patch)
tree2af4708bdb0e972b8e096bb1e31aed9a6a03515d /lib/SimpleSAML
parent2bfaaef9547baa8cb71b7f36553c3a9863289f1e (diff)
downloadsimplesamlphp-b4c6a6c468026edcb8f32e4bd86ded440b3871ca.zip
simplesamlphp-b4c6a6c468026edcb8f32e4bd86ded440b3871ca.tar.gz
simplesamlphp-b4c6a6c468026edcb8f32e4bd86ded440b3871ca.tar.bz2
Simplify NotFound exceptions by removing the backtrace. It doesn't really help much.
Diffstat (limited to 'lib/SimpleSAML')
-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(),
+ );
+ }
}