home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tlx501.zip / SRC / XSTDIO.CPP < prev   
C/C++ Source or Header  |  1996-07-08  |  2KB  |  55 lines

  1. /****************************************************************************
  2.     $Id: xstdio.cpp 501.0 1995/03/07 12:26:30 RON Exp $
  3.  
  4.     Copyright (c) 1991-95 Tarma Software Research. All rights reserved.
  5.  
  6.     Project:    Tarma Library for C++ V5.0
  7.     Author:     Ron van der Wal
  8.  
  9.     Implementation of class TLXStdio.
  10.  
  11.     $Log: xstdio.cpp $
  12.     Revision 501.0  1995/03/07 12:26:30  RON
  13.     Updated for TLX 5.01
  14.     Revision 1.3  1995/01/31 16:30:40  RON
  15.     Update for release 012
  16.     Added partial support for SunPro C++ compiler
  17.     Revision 1.2  1995/01/06  15:59:12  ron
  18.     Corrected Revision keyword
  19.  
  20.     Revision 1.1  1994/11/16  15:47:40  ron
  21.     Initial revision
  22.  
  23. ****************************************************************************/
  24.  
  25. #include <tlx\501\_build.h>
  26.  
  27. TLX_MODULE_INFO("$Revision: 501.0 $");
  28.  
  29. #include <errno.h>              // For errno
  30. #include <stdio.h>              // For sprintf()
  31. #include <string.h>             // For strerror()
  32. #include <tlx\501\except.h>
  33.  
  34. /*-------------------------------------------------------------------------*/
  35.     TLXStdio::TLXStdio(const TLXLocus &aLocus, const char *aFile)
  36.  
  37. /*  Constructor. Initializes the data members and base class.
  38. ---------------------------------------------------------------------------*/
  39. : TLException(aLocus), mErrNo(errno), mFileName(aFile)
  40. {
  41. }
  42.  
  43. /*-------------------------------------------------------------------------*/
  44.     const char *TLXStdio::Description() const
  45.  
  46. /*  Builds a description of the exception and returns a pointer to it.
  47.     The exception is built in the static buffer provided by class
  48.     TLException.
  49. ---------------------------------------------------------------------------*/
  50. {
  51.     sprintf(sBuffer, "Stdio error in %s: %s", mFileName, strerror(mErrNo));
  52.     return sBuffer;
  53. }
  54.  
  55.