552
|
|
|
mattgiuca |
16 years ago
|
|
|
551
|
|
|
mattgiuca |
16 years ago
|
|
|
550
|
|
|
mattgiuca |
16 years ago
|
|
|
549
|
|
|
stevenbird |
16 years ago
|
|
|
548
|
|
|
mattgiuca |
16 years ago
|
|
|
547
|
|
|
dcoles |
16 years ago
|
|
|
546
|
|
|
stevenbird |
16 years ago
|
|
|
545
|
|
|
agdimech |
16 years ago
|
|
|
544
|
|
|
mattgiuca |
16 years ago
|
|
|
543
|
|
|
agdimech |
16 years ago
|
|
|
542
|
|
|
drtomc |
16 years ago
|
|
|
541
|
|
|
drtomc |
16 years ago
|
|
|
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.
|
mattgiuca |
16 years ago
|
|
|
539
|
|
|
mattgiuca |
16 years ago
|
|
|
538
|
|
|
mattgiuca |
16 years ago
|
|
|
537
|
|
|
stevenbird |
16 years ago
|
|
|
536
|
|
|
mattgiuca |
16 years ago
|
|
|
535
|
|
|
mattgiuca |
16 years ago
|
|
|
534
|
|
|
mattgiuca |
16 years ago
|
|
|
533
|
|
|
mattgiuca |
16 years ago
|
|
|