#ifndef _CEGOPROCEXCEPTION_H_INCLUDED_
#define _CEGOPROCEXCEPTION_H_INCLUDED_
///////////////////////////////////////////////////////////////////////////////
//                                                         
// CegoProcException.h
// -------------------
// Cego procedure exception container class
//
// Design and Implementation by Bjoern Lemke
//
// (C)opyright 2000-2025 Bjoern Lemke
//
// INTERFACE MODULE
//
// Class: CegoProcException
// 
// Description: Stored procedure exception statement
//
// Status: CLEAN
//
///////////////////////////////////////////////////////////////////////////////

// base includes
#include <lfcbase/Chain.h>

// cego includes
#include "CegoProcBlock.h"
#include "CegoProcStmt.h"

class CegoProcException : public CegoProcStmt {

public:
  
    CegoProcException(CegoException type, CegoProcBlock *pBlock, CegoProcBlock *pParentBlock);
    ~CegoProcException();
    
    CegoException getException() const;
    CegoProcBlock* getBlock();
    CegoException execute();
    void cleanUp();
    Chain toChain(unsigned defTabSetId, const Chain& indent = Chain("")) const;
    Chain dbFormat(CegoDatabaseFormater *pForm) const;
    bool isStatic() const;

    CegoProcException& operator = ( const CegoProcException& pe);
    bool operator == ( const CegoProcException& pe);
    friend ostream& operator << (ostream& s, const CegoProcException& pe);
    
private:
    
    CegoException _excep;
    CegoProcBlock* _pBlock;
};
#endif
