Index: server/lib/gutenbach/ipp/operations.py
===================================================================
--- server/lib/gutenbach/ipp/operations.py	(revision 59a1d4a4e964c4ac353e7c2063acd3ce01b86cd6)
+++ server/lib/gutenbach/ipp/operations.py	(revision aef164ab99e07d5dba2dc91548e544a2064ea3c7)
@@ -1,6 +1,6 @@
-from .value import Value
 from .attribute import Attribute
 from .attributegroup import AttributeGroup
 from .request import Request
+from .value import Value
 import constants as consts
 import exceptions as err
Index: server/lib/gutenbach/server/requests.py
===================================================================
--- server/lib/gutenbach/server/requests.py	(revision 59a1d4a4e964c4ac353e7c2063acd3ce01b86cd6)
+++ server/lib/gutenbach/server/requests.py	(revision aef164ab99e07d5dba2dc91548e544a2064ea3c7)
@@ -1,5 +1,5 @@
 from gutenbach.server.printer import GutenbachPrinter
 import gutenbach.ipp as ipp
-import gutenbach.ipp.constants as const
+import gutenbach.ipp.constants as consts
 import logging
 
@@ -41,5 +41,25 @@
         handler = getattr(self, handler_name)
         logger.info("Handling request of type '%s'" % handler_name)
-        response = handler(request)
+
+        # Try to handle the request
+        try:
+            response = handler(request)
+
+        # Handle any errors that occur.  If an exception occurs that
+        # is an IPP error, then we can get the error code from the
+        # exception itself.
+        except ipp.errors.IPPException:
+            exctype, excval, exctb = sys.exc_info()
+            logger.error(traceback.format_exc())
+            response = ipp.ops.make_empty_response(request)
+            excval.update_response(response)
+
+        # If it wasn't an IPP error, then it's our fault, so mark it
+        # as an internal server error
+        except Exception:
+            logger.error(traceback.format_exc())
+            response = ipp.ops.make_empty_response(request)
+            response.operation_id = ipp.StatusCodes.INTERNAL_ERROR
+
         return response
 
@@ -47,5 +67,5 @@
         logger.warning("Received unknown operation 0x%x" % request.operation_id)
         response = ipp.ops.make_empty_response(request)
-        response.operation_id = const.StatusCodes.OPERATION_NOT_SUPPORTED
+        response.operation_id = consts.StatusCodes.OPERATION_NOT_SUPPORTED
         return response
         
@@ -58,5 +78,5 @@
         pass
 
-    @handler_for(const.Operations.GET_JOBS)
+    @handler_for(consts.Operations.GET_JOBS)
     def get_jobs(self, request):
         """RFC 2911: 3.2.6 Get-Jobs Operation
@@ -104,5 +124,5 @@
         pass
 
-    @handler_for(const.Operations.GET_PRINTER_ATTRIBUTES)
+    @handler_for(consts.Operations.GET_PRINTER_ATTRIBUTES)
     def get_printer_attributes(self, request):
         """RFC 2911: 3.2.5 Get-Printer-Attributes Operation
@@ -217,5 +237,5 @@
     ##### CUPS Specific Commands
 
-    @handler_for(const.Operations.CUPS_GET_DEFAULT)
+    @handler_for(consts.Operations.CUPS_GET_DEFAULT)
     def cups_get_default(self, request):
         """The CUPS-Get-Default operation (0x4001) returns the default
@@ -233,5 +253,5 @@
         return response
 
-    @handler_for(const.Operations.CUPS_GET_PRINTERS)
+    @handler_for(consts.Operations.CUPS_GET_PRINTERS)
     def cups_get_printers(self, request):
         """The CUPS-Get-Printers operation (0x4002) returns the
@@ -253,5 +273,5 @@
         return response
 
-    @handler_for(const.Operations.CUPS_GET_CLASSES)
+    @handler_for(consts.Operations.CUPS_GET_CLASSES)
     def cups_get_classes(self, request):
         """The CUPS-Get-Classes operation (0x4005) returns the printer
Index: server/lib/gutenbach/server/server.py
===================================================================
--- server/lib/gutenbach/server/server.py	(revision ef8df33517ae78d621e3149fe0bdf958c1251aa3)
+++ server/lib/gutenbach/server/server.py	(revision aef164ab99e07d5dba2dc91548e544a2064ea3c7)
@@ -3,6 +3,6 @@
 import gutenbach.ipp as ipp
 import logging
+import sys
 import traceback
-import sys
 
 # initialize logger
@@ -27,27 +27,14 @@
         length = int(self.headers.getheader('content-length', 0))
         request = ipp.Request(request=self.rfile, length=length)
-        logger.debug("Received request: %s" % repr(request))
 
         # Get the handler and pass it the request and response
         # objects.  It will fill in values for the response object or
-        # thrown an error.
+        # throw a fatal error.
+        logger.debug("Received request: %s" % repr(request))
         try:
             response = self.root.handle(request)
-            
-        # Handle any errors that occur.  If an exception occurs that
-        # is an IPP error, then we can get the error code from the
-        # exception itself.
-        except ipp.errors.IPPException:
-            exctype, excval, exctb = sys.exc_info()
-            logger.error(traceback.format_exc())
-            response = ipp.ops.make_empty_response(request)
-            excval.update_response(response)
-
-        # If it wasn't an IPP error, then it's our fault, so mark it
-        # as an internal server error
-        except Exception:
-            logger.error(traceback.format_exc())
-            response = ipp.ops.make_empty_response(request)
-            response.operation_id = ipp.StatusCodes.INTERNAL_ERROR
+        except:
+            logger.fatal(traceback.format_exc())
+            sys.exit(1)
 
         # Send the response across HTTP
