//
// Copyright (C) 1991 Texas Instruments Incorporated.
//
// Permission is granted to any individual or institution to use, copy, modify,
// and distribute this software, provided that this complete copyright and
// permission notice is maintained, intact, in all copies and supporting
// documentation.
//
// Texas Instruments Incorporated provides this software "as is" without
// express or implied warranty.
//
// Created: MJF 07/05/89 -- Initial design and implementation.
// Updated: LGO 09/20/89 -- Split into separate file.

// An overview of the structure of the Exception class, the Excp_Handler class
// and the exception mechanism for creating, raising and handling an exception
// can be found in the Exception.h header file.

#include <cool/Exception.h>	// include the Exception header file.
#include <cool/Generic.h>	// include the Generic header file.

// operator<<(ostream&, Exception&) -- an Exception can print itself.
//
// INPUT:   Output stream and Exception reference.
// OUTPUT:  Output stream.

ostream& operator<<(ostream& os, const Exception& excp) {
  excp.report(os);
  return os;
}

// operator<<(ostream&, Exception*) -- an Exception can print itself.
//
// INPUT:   Output stream and Exception pointer.
// OUTPUT:  Output stream.

ostream& operator<<(ostream& os, const Exception* excp) {
  excp->report(os);
  return os;
}
