
import exceptions

class PyWXSBException (exceptions.Exception):
    """Base class for exceptions that indicate a problem that the user should fix."""
    pass

class SchemaValidationError (PyWXSBException):
    """Raised when the XML hierarchy does not appear to be valid for an XML schema."""
    pass

class BadTypeValueError (PyWXSBException):
    """Raised when a value in an XML attribute does not conform to the simple type."""
    pass

class NotInNamespaceError (PyWXSBException):
    '''Raised when a name is referenced that is not defined in the appropriate namespace.'''
    __namespace = None
    __ncName = None

class BadPropertyError (PyWXSBException):
    """Raised when a schema component property is accessed on a component instance that does not define that property."""
    pass

class PyWXSBError (exceptions.Exception):
    """Base class for exceptions that indicate a problem that the user probably can't fix."""
    pass
    
class LogicError (PyWXSBError):
    """Raised when the code detects an implementation problem."""

class IncompleteImplementationError (LogicError):
    """Raised when a code branch is taken that has not yet been implemented."""


import exceptions

class PyWXSBException (exceptions.Exception):
    """Base class for exceptions that indicate a problem that the user should fix."""
    pass

class SchemaValidationError (PyWXSBException):
    """Raised when the XML hierarchy does not appear to be valid for an XML schema."""
    pass

class BadTypeValueError (PyWXSBException):
    """Raised when a value in an XML attribute does not conform to the simple type."""
    pass

class NotInNamespaceError (PyWXSBException):
    '''Raised when a name is referenced that is not defined in the appropriate namespace.'''
    __namespace = None
    __ncName = None

class BadPropertyError (PyWXSBException):
    """Raised when a schema component property is accessed on a component instance that does not define that property."""
    pass

class BadDocumentError (PyWXSBException):
    """Raised when processing document content and an error is encountered."""
    pass

class PyWXSBError (exceptions.Exception):
    """Base class for exceptions that indicate a problem that the user probably can't fix."""
    pass
    
class LogicError (PyWXSBError):
    """Raised when the code detects an implementation problem."""

class IncompleteImplementationError (LogicError):
    """Raised when a code branch is taken that has not yet been implemented."""

Add an exception to throw when a document does have the expected structure
Add an exception to throw when a document does have the expected structure

  
  import exceptions
  
  class PyWXSBException (exceptions.Exception):
      """Base class for exceptions that indicate a problem that the user should fix."""
      pass
  
  class SchemaValidationError (PyWXSBException):
      """Raised when the XML hierarchy does not appear to be valid for an XML schema."""
      pass
  
  class BadTypeValueError (PyWXSBException):
      """Raised when a value in an XML attribute does not conform to the simple type."""
      pass
  
  class NotInNamespaceError (PyWXSBException):
      '''Raised when a name is referenced that is not defined in the appropriate namespace.'''
      __namespace = None
      __ncName = None
  
  class BadPropertyError (PyWXSBException):
      """Raised when a schema component property is accessed on a component instance that does not define that property."""
      pass
  
+ class BadDocumentError (PyWXSBException):
+     """Raised when processing document content and an error is encountered."""
+     pass
+ 
  class PyWXSBError (exceptions.Exception):
      """Base class for exceptions that indicate a problem that the user probably can't fix."""
      pass
      
  class LogicError (PyWXSBError):
      """Raised when the code detects an implementation problem."""
  
  class IncompleteImplementationError (LogicError):
      """Raised when a code branch is taken that has not yet been implemented."""
  
Add an exception to throw when a document does have the expected structure
## Code Before:

import exceptions

class PyWXSBException (exceptions.Exception):
    """Base class for exceptions that indicate a problem that the user should fix."""
    pass

class SchemaValidationError (PyWXSBException):
    """Raised when the XML hierarchy does not appear to be valid for an XML schema."""
    pass

class BadTypeValueError (PyWXSBException):
    """Raised when a value in an XML attribute does not conform to the simple type."""
    pass

class NotInNamespaceError (PyWXSBException):
    '''Raised when a name is referenced that is not defined in the appropriate namespace.'''
    __namespace = None
    __ncName = None

class BadPropertyError (PyWXSBException):
    """Raised when a schema component property is accessed on a component instance that does not define that property."""
    pass

class PyWXSBError (exceptions.Exception):
    """Base class for exceptions that indicate a problem that the user probably can't fix."""
    pass
    
class LogicError (PyWXSBError):
    """Raised when the code detects an implementation problem."""

class IncompleteImplementationError (LogicError):
    """Raised when a code branch is taken that has not yet been implemented."""

## Instruction:
Add an exception to throw when a document does have the expected structure
## Code After:

import exceptions

class PyWXSBException (exceptions.Exception):
    """Base class for exceptions that indicate a problem that the user should fix."""
    pass

class SchemaValidationError (PyWXSBException):
    """Raised when the XML hierarchy does not appear to be valid for an XML schema."""
    pass

class BadTypeValueError (PyWXSBException):
    """Raised when a value in an XML attribute does not conform to the simple type."""
    pass

class NotInNamespaceError (PyWXSBException):
    '''Raised when a name is referenced that is not defined in the appropriate namespace.'''
    __namespace = None
    __ncName = None

class BadPropertyError (PyWXSBException):
    """Raised when a schema component property is accessed on a component instance that does not define that property."""
    pass

class BadDocumentError (PyWXSBException):
    """Raised when processing document content and an error is encountered."""
    pass

class PyWXSBError (exceptions.Exception):
    """Base class for exceptions that indicate a problem that the user probably can't fix."""
    pass
    
class LogicError (PyWXSBError):
    """Raised when the code detects an implementation problem."""

class IncompleteImplementationError (LogicError):
    """Raised when a code branch is taken that has not yet been implemented."""
