Tutorial by Topics: errors

There are many reasons a read or write operation may fail. A frequent one is because your security rules reject the operation, for example because you're not authenticated (by default a database can only be accessed by an authenticated user) or because you're writing/listening at a location where you don't have permission.

Code that compiles can still run into errors, at run-time. This topic lists the most common ones, their causes, and how to avoid them.

CustomErrors are a legacy (backwards compatable) element, used by Visual Studio Development Server (aka. VSDS or Cassini).

httpErrors are the new element which is only used by IIS7.

Python has many built-in exceptions which force your program to output an error when something in it goes wrong.

However, sometimes you may need to create custom exceptions that serve your purpose.

In Python, users can define such exceptions by creating a new class. This exception class has to be derived, either directly or indirectly, from Exception class. Most of the built-in exceptions are also derived from this class.

Page 1 of 1