Exceptions.cpp 426 B

123456789101112131415161718192021222324
  1. #include "Archive.h"
  2. #include <cmath>
  3. #include <cstring>
  4. #include <cstdarg>
  5. using WalrusRPG::PIAF::PIAFException;
  6. using namespace WalrusRPG::PIAF;
  7. PIAFException::PIAFException(const char *format, ...) : msg("")
  8. {
  9. va_list list;
  10. va_start(list, format);
  11. vsnprintf(msg, 1024, format, list);
  12. va_end(list);
  13. }
  14. PIAFException::~PIAFException()
  15. {
  16. }
  17. const char *PIAFException::what() const throw()
  18. {
  19. return msg;
  20. }