Sleeping Wombat Common Library  0.50.0
swCommonLibrary
SerializationException.h
1 #pragma once
2 
3 #include "swCommonLib/Common/Exceptions/Exception.h"
4 #include "swCommonLib/Serialization/FilePosition.h"
5 
6 
7 
8 namespace sw
9 {
10 
15 {
16 private:
17 
18  FilePosition m_filePosition;
19 
20 public:
21 
22  explicit SerializationException ( const std::string& message, FilePosition filePos )
23  : RuntimeException( message )
24  , m_filePosition( filePos )
25  {}
26 
28  virtual std::string ErrorMessage () const;
29 
30 
31 protected:
32 
33  std::string PrintLineNumber () const;
34  std::string PrintWarning () const;
35  std::string PrintError () const;
36 };
37 
38 DEFINE_PTR_TYPE( SerializationException )
39 
40 } // sw
41 
virtual std::string ErrorMessage() const
Returns human readable exception message.
Definition: SerializationException.cpp:18
Definition: Exception.h:11
Definition: FilePosition.h:11
Base class for serialization exceptions.
Definition: SerializationException.h:14
Base Sleeping Wombat exception class containing string error message.
Definition: Exception.h:34