While web application development differs from development of an accounting system, certain fundamentals remain the same. For example, if a page is not found, you may want to present a special interface, such as a page that informs of the error and offers search and other links. HTTP error codes and other error conditions are mapped into the language exceptions. This allows using the same framework for stand-alone GUI applications. Furthermore, because these exceptions are objects, to return an HTTP error page they are caught and returned as responses to the HTTP request.
Error handling is another issue that warrants a special attention.
An obvious solution is to use exceptions. Comanche introduces a set of exceptions that correspond to HTTP error codes. For development purposes, the exception catching can be turned off, so that errors show up in the debugger. This also makes it possible to cut off some protocol conversion overhead when the client resides in the same environment as the server, which may be the case on a development station. Suppose you decide to create a graphic design tutorial and share it on the web.