Next / Previous / Contents / TCC Help System / NM Tech homepage

15. class ScriptError: Our exception

This exception is raised anywhere that a script cannot continue.
# - - - - -   c l a s s   S c r i p t E r r o r

class ScriptError(Exception):
    '''Exception for any problem in a CGI script.


Originally, we used ScriptError whenever we reached a condition where we couldn't go on. However, at one point a bit of code raised a ScriptError for another reason, and it was quite tricky to diagnose: the page just said “Too many values to unpack,” and it was necessary to use triangulation to find it.