Commit 4a7ea600 authored by Nigel McNie's avatar Nigel McNie
Browse files

Make ConfigException's error reporting work like UserException.

A generic message is now displayed before the actual message.

ConfigExceptions aren't used in many places right now (the IMAP auth
plugin seems to be all), so the change seems safe enough.
parent 6ef7d2d8
......@@ -585,15 +585,15 @@ class SystemException extends MaharaException implements MaharaThrowable {
class ConfigException extends MaharaException implements MaharaThrowable {
public function render_exception () {
return $this->getMessage();
return $this->get_string('message') . "\n\n" . $this->getMessage();
}
public function strings() {
return array_merge(parent::strings(),
array('message' => $this->get_sitename()
. ' is misconfigured and this is causing problems. '
. 'You probably need to contact an administrator to get this fixed. '
. ' Details, if any, follow:'));
array('message' => 'The environment where ' . $this->get_sitename()
. ' is running is misconfigured and this is causing problems. '
. 'You probably need to contact a server administrator to get this fixed. '
. 'Details, if any, follow:'));
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment