### IMustBeEmpty

  The IMustBeEmpty class provides a message reporting that the function could not perform an operation on a container because the container is not empty. When your code encounters circumstances that cause it to throw this exception, you can use an instance of this class to provide the standard error message or you can construct an object of this class that contains a custom message.

### IMustBeEmpty - Member Functions and Data by Group

### Constructors & Destructor

You can construct and destruct objects of this class. You cannot assign one IMustBeEmpty object from another.

~IMustBeEmpty

      public:
      virtual ~IMustBeEmpty()

  This function destroys an exception created by an IMustBeEmpty constructor.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

IMustBeEmpty

  This function creates an exception reporting that an operation on a container failed because the container was not empty.

  You can create objects of this class by doing the following:

  - Using the constructor where you specify the error text.
  - Using the macros discussed in IException. The Open Class Library provides these macros to make creating exceptions easier for you.

  You can also copy an instance of this exception class.

  Overload 1

      public:
      IMustBeEmpty(const IMustBeEmpty&)

  The copy constructor is provided so that the compiler can make copies of the object during the throwing of an exception.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2
  Constructs an IMustBeEmpty exception with a custom error message, if one is provided.

      public:
      IMustBeEmpty(const char* text = 0)

  Use this function to create an exception that allows you to specify a customized error message. If you provide one, your error message is used instead of the default one.

  text
    The error message to use for this exception. If no error message is provided, a default message will be used instead.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Exception Type

Use the function in this group to obtain the name of the exception.

name
  Returns the exception class name.

      public:
      virtual const char* name() const

  Returns the name of the actual exception class.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IMustBeEmpty - Inherited Member Functions and Data

#### Inherited Public Functions

  IAccessError

  -     virtual ~IAccessError()

  -     IAccessError(const IAccessError& exception)

  -     IAccessError( const char* errorText,
                      unsigned long errorId = 0,
                      Severity severity = IException::unrecoverable )

  IException

  -     virtual ~IException()

  -     virtual IException&
          addLocation( const IExceptionLocation& location )

  -     IException& appendText(const char* errorText)

  -     static void
          assertParameter( const char* exceptionText,
                           IExceptionLocation location )

  -     ErrorCodeGroup errorCodeGroup() const

  -     unsigned long errorId() const

  -     IException( const char* errorText,
                    unsigned long errorId = 0,
                    Severity severity = IException::unrecoverable )

  -     IException(const IException& exception)

  -     virtual int isRecoverable() const

  -     const IExceptionLocation*
          locationAtIndex( unsigned long locationIndex ) const

  -     unsigned long locationCount() const

  -     virtual IException& logExceptionData()

  -     IException& setErrorCodeGroup(ErrorCodeGroup errorGroup)

  -     IException& setErrorId(unsigned long errorId)

  -     IException& setSeverity(Severity severity)

  -     IException& setText(const char* errorText)

  -     static IException::TraceFn*
          setTraceFunction( IException::TraceFn& traceFunction )

  -     virtual void terminate()

  -     const char* text(unsigned long indexFromTop = 0) const

  -     unsigned long textCount() const

#### Inherited Public Data

  IException

  -     static ErrorCodeGroup const baseLibrary

  -     static ErrorCodeGroup const CLibrary

  -     static ErrorCodeGroup const operatingSystem

  -     static ErrorCodeGroup const other

  -     static ErrorCodeGroup const presentationSystem

#### Inherited Protected Functions

  - None

#### Inherited Protected Data

  - None