/*
 * C++ Library file exception
 * Copyright 2001 ARM Limited. All rights reserved.
 */

/*
 * RCS $Revision$
 * Checkin $Date$
 * Revising $Author$
 */

#ifndef __EXCEPTION_INCLUDED
#define __EXCEPTION_INCLUDED
#define __ARMCLIB_VERSION 5060044

/* Edison Design Group, 1995-2005. */
/*
exception -- Include file for exception handling (see 18.6)
*/

namespace std {

/* This lets users disable the EDG supplied exception classes. */
#ifndef __NO_EDG_EXCEPTION_CLASSES

  class exception {
  public:
    exception() throw();
    exception(const exception&) throw();
    exception& operator=(const exception&) throw();
    virtual ~exception() throw();
    virtual const char* what() const throw();
  };

  class bad_exception : public exception {
  public:
    bad_exception() throw();
    bad_exception(const bad_exception&) throw();
    bad_exception& operator=(const bad_exception&) throw();
    virtual ~bad_exception() throw();
    virtual const char* what() const throw();
  };

#endif /* ifndef __NO_EDG_EXCEPTION_CLASSES */

  typedef void (*terminate_handler)();
  extern terminate_handler set_terminate(terminate_handler) throw();

  typedef void (*unexpected_handler)();
  extern unexpected_handler set_unexpected(unexpected_handler) throw();

  void terminate();
  void unexpected();

  extern bool uncaught_exception() throw();

}  /* namespace std */

#ifdef __EDG_IMPLICIT_USING_STD
/* Implicitly include a using directive for the STD namespace when this
   preprocessing flag is TRUE. */
using namespace ::std;
#endif /* ifdef __EDG_IMPLICIT_USING_STD */

#endif /* __EXCEPTION_INCLUDED */

