Author: Andrew Nicols
MDL-86848 core: Throw exception instead of redirecting on /index.php
http://git.moodle.org/gw?p=moodle.git;a=commit;h=8de3c9a4b5cb0b36c75d794118e0273e75c1db86
http://github.com/moodle/moodle/commit/8de3c9a4b5cb0b36c75d794118e0273e75c1db86
+ 5.1 en [rootdirpublic,core_error]