rt_error_message.h 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. #ifndef AFUN_RT_ERROR_MESSAGE_H
  2. #define AFUN_RT_ERROR_MESSAGE_H
  3. #include "aFunRuntimeExport.h"
  4. #include "aFuncore.h"
  5. #include "rt_top_message.h"
  6. namespace aFunrt {
  7. class AFUN_RT_EXPORT ErrorMessage : public TopMessage {
  8. public:
  9. struct TrackBack {
  10. const aFuntool::FilePath path;
  11. aFuntool::FileLine line;
  12. };
  13. explicit ErrorMessage(std::string error_type_, std::string error_info_, aFuncore::Inter &inter);
  14. AFUN_INLINE ErrorMessage(ErrorMessage &&msg) noexcept;
  15. void topProgress(aFuncore::Inter &inter_, aFuncore::Activation &activation) override;
  16. [[nodiscard]] AFUN_INLINE std::string getErrorType() const;
  17. [[nodiscard]] AFUN_INLINE std::string getErrorInfo() const;
  18. [[nodiscard]] AFUN_INLINE const std::list<TrackBack> &getTrackBack() const;
  19. private:
  20. aFuncore::Inter &inter;
  21. std::string error_type;
  22. std::string error_info;
  23. std::list<TrackBack> trackback;
  24. };
  25. }
  26. #include "rt_error_message.inline.h"
  27. #endif //AFUN_RT_ERROR_MESSAGE_H