Skip to content
Snippets Groups Projects
Commit 7ff42140 authored by Olav Morken's avatar Olav Morken
Browse files

Documentation for the custom error show function.

Thanks to Andjelko Horvat for providing the documentation patch.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2725 44740490-163a-0410-bde0-09ae8108e29a
parent a884a0cb
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,14 @@ $config = array (
'showerrors' => TRUE,
/**
* Custom error show function called from SimpleSAML_Error_Error::show.
* See docs/simplesamlphp-errorhandling.txt for function code example.
*
* Example:
* 'errors.show_function' => 'sspmod_exmaple_Error_Show::show',
*/
/**
* This option allows you to enable validation of XML data against its
* schemas. A warning will be written to the log if validation fails.
......
......@@ -227,3 +227,17 @@ This happens regardless of whether the exception is delivered directly or throug
This is done to be consistent in what the application receives - now it will always receive the same exception, regardless of whether it is delivered directly or through a redirect.
Custom error show function
--------------------------
Optional custom error show function, called from SimpleSAML_Error_Error::show, is defined with 'errors.show_function' in config.php.
Example code for this function, which implements the same functionality as SimpleSAML_Error_Error::show, looks something like:
public static function show(SimpleSAML_Configuration $config, array $data) {
$t = new SimpleSAML_XHTML_Template($config, 'error.php', 'errors');
$t->data = array_merge($t->data, $data);
$t->show();
exit;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment