Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
212fcc54
Commit
212fcc54
authored
Jan 29, 2007
by
Nigel McNie
Committed by
Nigel McNie
Jan 29, 2007
Browse files
Added a NotFoundException for files that are not found
parent
6ff51210
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/errors.php
View file @
212fcc54
...
...
@@ -678,5 +678,22 @@ class AccessDeniedException extends UserException {
}
}
/**
* Exception - Not found. Throw this if a user is trying to view something
* that doesn't exist
*/
class
NotFoundException
extends
UserException
{
public
function
strings
()
{
return
array_merge
(
parent
::
strings
(),
array
(
'message'
=>
'The page you are looking for could not be found'
,
'title'
=>
'Not found'
));
}
public
function
render_exception
()
{
header
(
'HTTP/1.0 404 Not Found'
,
true
);
return
parent
::
render_exception
();
}
}
?>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment