Minesweeper2  V1.1.1 Game in C++ by Górka Mateusz
Error.hpp
Go to the documentation of this file.
1 
14 class Error {
15 public:
16  virtual const char* what() const { return "Unnamed error!"; }
17  virtual const char* where() const { return ""; }
18 };
19 
20 
22 
27 class ErrAlloc : public Error {
28 public:
29  const char* what() const { return "Allocation error!"; }
30 };
31 
32 
36 class ErrInput : public Error {
37 private:
38  const char* info;
39 
40 public:
41  inline ErrInput( const char* txt ): info(txt){}
42  const char* what() const { return info; }
43 };
44 
48 class ErrSys : public Error {
49 private:
50  const char* info;
51 
52 public:
53  inline ErrSys( const char* txt ): info(txt){}
54  const char* what() const { return info; }
55 };
56 
60 class EndGame : public Error {
61 private:
62  const char* info;
63 
64 public:
65  inline EndGame( const char* txt ): info(txt){}
66  const char* what() const { return info; }
67 };
EndGame::what
const char * what() const
Definition: Error.hpp:66
ErrInput
Error Input.
Definition: Error.hpp:36
ErrSys
Error.
Definition: Error.hpp:48
ErrAlloc
Class of Alloc errors.
Definition: Error.hpp:27
ErrAlloc::what
const char * what() const
Definition: Error.hpp:29
Error::what
virtual const char * what() const
Definition: Error.hpp:16
ErrInput::info
const char * info
Definition: Error.hpp:38
ErrInput::what
const char * what() const
Definition: Error.hpp:42
ErrSys::what
const char * what() const
Definition: Error.hpp:54
EndGame::info
const char * info
Definition: Error.hpp:62
Error::where
virtual const char * where() const
Definition: Error.hpp:17
ErrInput::ErrInput
ErrInput(const char *txt)
Definition: Error.hpp:41
Error
Error virtual class.
Definition: Error.hpp:14
EndGame
End game exception.
Definition: Error.hpp:60
EndGame::EndGame
EndGame(const char *txt)
Definition: Error.hpp:65
ErrSys::info
const char * info
Definition: Error.hpp:50
ErrSys::ErrSys
ErrSys(const char *txt)
Definition: Error.hpp:53