#ifndef _AUTOGENERATIONEXCEPTION_H_
#define _AUTOGENERATIONEXCEPTION_H_

//
// Copyright (C) 2004-2006  Autodesk, Inc.
// 
// This library is free software; you can redistribute it and/or
// modify it under the terms of version 2.1 of the GNU Lesser
// General Public License as published by the Free Software Foundation.
// 
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
//

#ifdef _WIN32
#pragma once
#endif

#include <FdoStd.h>
#include <Fdo/Schema/SchemaException.h>

/// \brief
/// The FdoAutogenerationException class is the exception type thrown
/// when autogeneration of a data property cannot be honored, either because
/// the data type is not supported for autogeneration, too many properties
/// were marked as autogenerated, the autogeneration feature is not supported,
/// or possibly because of provider-specific errors.
class FdoAutogenerationException : public FdoSchemaException
{
/// \cond DOXYGEN-IGNORE
protected:
    /// Constructs a default instance of an FdoAutogenerationException.
    FdoAutogenerationException();

    /// Constructs an instance of an FdoAutogenerationException using the specified
    /// arguments.
    FdoAutogenerationException(FdoString* message);

    /// Constructs an instance of an FdoAutogenerationException using the specified
    /// arguments.
    FdoAutogenerationException(FdoString* message, FdoException* cause);

    /// Constructs an instance of an FdoAutogenerationException using the specified
    /// arguments.
    FdoAutogenerationException(FdoString* message, FdoException* cause, FdoInt64 nativeErrorCode);

    virtual ~FdoAutogenerationException();

    virtual void Dispose();
/// \endcond

public:
    /// \brief
    /// Constructs a default instance of an FdoAutogenerationException.
    /// 
    /// \return
    /// Returns FdoAutogenerationException
    /// 
    FDO_API static FdoAutogenerationException* Create();

    /// \brief
    /// Constructs an instance of an FdoAutogenerationException using the specified arguments.
    /// 
    /// \param message 
    /// Input message text
    /// 
    /// \return
    /// Returns FdoAutogenerationException
    /// 
    FDO_API static FdoAutogenerationException* Create(FdoString* message);

    /// \brief
    /// Constructs an instance of an FdoAutogenerationException using the specified arguments.
    /// 
    /// \param message 
    /// Input message text
    /// \param nativeErrorCode 
    /// Input the native error code of the error, which is returned by FDO data source
    /// 
    /// \return
    /// Returns FdoExpressionException
    /// 
    FDO_API static FdoAutogenerationException* Create(FdoString* message, FdoInt64 nativeErrorCode);

    /// \brief
    /// Constructs an instance of an FdoAutogenerationException using the specified arguments.
    /// 
    /// \param name 
    /// Input name text
    /// \param cause 
    /// Input cause of exception
    /// 
    /// \return
    /// Returns FdoAutogenerationException
    /// 
    FDO_API static FdoAutogenerationException* Create(FdoString* name, FdoException* cause);

    /// \brief
    /// Constructs an instance of an FdoAutogenerationException using the specified arguments.
    /// 
    /// \param message 
    /// Input message text
    /// \param cause 
    /// Input cause of exception
    /// \param nativeErrorCode 
    /// Input the native error code of the error, which is returned by FDO data source
    /// 
    /// \return
    /// Returns FdoExpressionException
    /// 
    FDO_API static FdoAutogenerationException* Create(FdoString* message, FdoException* cause, FdoInt64 nativeErrorCode);
};

/// \ingroup (typedefs)
/// \brief
/// FdoSchemaExceptionP is a FdoPtr on FdoAutogenerationException, provided for convenience.
typedef FdoPtr<FdoAutogenerationException> FdoAutogenerationExceptionP;

#endif


