Drive Engine  1.0.0
Plateforme de reconstruction 3D
ExceptionManager.h
1 // Copyright (c) 2015. All rights reserved to DriveEngine Team.
2 
3 #pragma once
4 
5 #include "Public/ErrorHandling/IFrameworkException.h"
6 
7 namespace DriveEngine
8 {
21  {
22  private:
23  ErrorHandler errorHandler;
24 
25  public:
26  static ExceptionManager& GetInstance()
27  {
28  static ExceptionManager instance;
29  return instance;
30  }
31 
32  private:
35  ExceptionManager(ExceptionManager const&) = delete;
36  void operator=(ExceptionManager const&) = delete;
37 
38  public:
39 
46  void Register(ErrorHandler errorHandler);
47 
55  void Unregister();
56 
63  void Throw(const IException& exception) const;
64 
65  private:
66  static void DefaultErrorHandler(const IException& exception);
67  };
68 }
(Internal class) Manager for framework exceptions.
Definition: ExceptionManager.h:20
Interface for every exception related to the framework.
Definition: IException.h:14
void Unregister()
Unregister any registered error handler.
Definition: ExceptionManager.cpp:20
Definition: DefaultCalibrationInfoList.h:12
void Register(ErrorHandler errorHandler)
Registers an error handler. It override every previously registered error handler.
Definition: ExceptionManager.cpp:15
void Throw(const IException &exception) const
Throws the given framework exception. The registered handler will be called automatically to manage t...
Definition: ExceptionManager.cpp:25