
#include "fpreproc/f77name.h"
#include "preact/transperror.h"
#include <iostream> 

using namespace std ;  // pollution

// -------------------- TranspError -------------------
TranspError::TranspError(string info) throw() : exception(), description(info) { };

TranspError::TranspError(const TranspError& a) throw() : exception(a), description(a.description) {} ;
  
TranspError& TranspError::operator=(const TranspError& a) throw() {
  if (&a != this) {
    exception::operator=(a) ;      // copy base class
    description = a.description ;
  }
  return *this ;
} ;

TranspError::~TranspError() throw() {} ;

const char* TranspError::what() const throw() {
  return description.c_str() ;
} ;

const string TranspError::whats() const throw() {
  return description ;
} ;


void ExitTranspError(string info) {
  cerr << "? ExitTranspError:: EXCEPTION handling turned off -- calling portlib::bad_exit()" << endl ;
  cerr << info << endl ;
  F77NAME(bad_exit)() ;
} ;



