Skip to main content

System Coupling C++ library 2025 R1

NonFatalError

Last update: 17.07.2025
1 
2 /*
3  * Copyright ANSYS. All rights reserved.
4  */
5 #pragma once
6 
7 #include "LibraryType.hpp"
8 
9 #include <exception>
10 #include <string>
11 
12 namespace sysc {
13 
14 class NonFatalError : public std::exception {
15 public:
16  NonFatalError(std::string str) :
17  m_str("NonFatalError: " + std::move(str))
18  {
19  }
20  ~NonFatalError() noexcept override = default;
21  const char* what() const noexcept override { return m_str.c_str(); }
22 
23 private:
24  std::string m_str;
25 };
26 
27 void SYSTEM_COUPLING_PARTICIPANT_DLL throwNonFatalError(const std::string& errorMessage);
28 
29 } // namespace sysc

Connect with Ansys