Sirius  0.0.0
exception.h
Go to the documentation of this file.
1 
22 #ifndef SIRIUS_FFTW_EXCEPTION_H_
23 #define SIRIUS_FFTW_EXCEPTION_H_
24 
25 #include <string>
26 
27 #include "sirius/exception.h"
28 
29 namespace sirius {
30 namespace fftw {
31 
35 enum class ErrorCode {
36  kSuccess = 0,
41 };
42 
46 class Exception : public sirius::Exception {
47  public:
48  Exception(ErrorCode code);
49 
50  Exception(const Exception&) = default;
51  Exception& operator=(const Exception&) = default;
52  Exception(Exception&&) = default;
53  Exception& operator=(Exception&&) = default;
54 
55  const char* what() const noexcept override;
56 
57  private:
58  ErrorCode err_code_;
59  std::string default_err_msg_;
60 };
61 
62 } // namespace fftw
63 } // namespace sirius
64 
65 #endif // SIRIUS_FFTW_EXCEPTION_H_
Base class for sirius exceptions.
Definition: exception.h:32
Exception & operator=(const Exception &)=default
Exception wrapper for FFTW error.
Definition: exception.h:46
ErrorCode
FFTW error codes.
Definition: exception.h:35
Definition: exception.h:27
const char * what() const noexcept override
Exception(ErrorCode code)