~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/user-settings.html

  • Committer: mattgiuca
  • Date: 2008-02-22 00:53:35 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:540
Refactored error handling and reporting. Much friendlier error messages, for
both developers and users.

Note that PythonDebug is now going to be ignored. IVLE itself selects when to
display a traceback. (So IVLE will display tracebacks even in a production
environment, for internal server errors).

common/util.py: Added class IVLEError, which is now used for throwing
user-readable errors inside IVLE instead of throwing apache SERVER_RETURN
exceptions.

dispatch/request: throw_error now throws an IVLEError instead of a
SERVER_RETURN. It also takes a new argument, "message", which can be used to
place an optional message inside the exception which will be displayed to the
user.
Finally, added a method get_http_codename which returns the name and
description of common HTTP error codes. (Used to report errors which don't
have a message supplied).

dispatch/__init__: Added a wrapper around handler which catches all exceptions
thrown out of IVLE.
The handler for this selectively handles exceptions.
4xx level exceptions thrown are user errors, so these are reported in a very
friendly way, with no traceback, and in the familiar IVLE environment.
5xx level exceptions and any other exceptions are reported in a minimal
environment (to avoid cascading errors) with a traceback and a request for the
user to report it to the administrators.

As many calls to req.throw_error as possible should now have a message
included, to make identifying errors easier.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html xmlns="http://www.w3.org/1999/xhtml"
2
 
      xmlns:py="http://genshi.edgewall.org/">
3
 
  <head>
4
 
    <script type="text/javascript">
5
 
      settings_login = '${login}';
6
 
    </script>
7
 
  </head>
8
 
  <body>
9
 
    <div id="ivle_padding">
10
 
 
11
 
      <h2>User Profile</h2>
12
 
      <p>
13
 
        <span id="login"></span>
14
 
      </p>
15
 
      <p id="role"></p>
16
 
      <h3>Change settings</h3>
17
 
      <form action="">
18
 
        <table>
19
 
          <tr>
20
 
            <td>Display name:</td>
21
 
            <td>
22
 
              <input type="text"
23
 
                  name="nick" id="nick" size="40" />
24
 
            </td>
25
 
          </tr>
26
 
          <tr>
27
 
            <td>Email address:</td>
28
 
            <td>
29
 
              <input type="text"
30
 
                  name="email" id="email" size="40" />
31
 
            </td>
32
 
          </tr>
33
 
        </table>
34
 
        <div id="changepassword"></div>
35
 
        <p id="result"></p>
36
 
        <p>
37
 
          <input value="Save" onclick="return save_settings()" id="save"
38
 
                type="submit" />
39
 
          <input value="Revert" onclick="return revert_settings()" id="revert"
40
 
                type="reset" />
41
 
        </p>
42
 
      </form>
43
 
      <div id="notices"></div>
44
 
    </div>
45
 
  </body>
46
 
</html>