Exceptions.cpp 482 B

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