basic_exception.cc
上传用户:psq1974
上传日期:2007-01-06
资源大小:1195k
文件大小:1k
源码类别:

mpeg/mp3

开发平台:

C/C++

  1. /* Copyright (C) 1998, 1999 State University of New York at Stony Brook
  2.    Author: Andrew V. Shuvalov ( andrew@ecsl.cs.sunysb.edu )
  3.    Software license is located in file "COPYING"
  4. */
  5. #include <stdio.h>
  6. #include <stdlib.h>
  7. #include "basic_exception.h"
  8. void BasicException::init( const char *format, ... )
  9. {
  10.   va_list ap;
  11.   va_start( ap, format );
  12.   init( format, ap );
  13.   va_end( ap );
  14. }
  15. void BasicException::init( const char *format, va_list ap )
  16. {
  17.   char buf[1024];
  18.   vsnprintf( buf, sizeof( buf ), format, ap );
  19.   
  20.   text = buf;
  21. }