VRay SDK for C++
Loading...
Searching...
No Matches
vraythrow.hpp
1#ifndef _VRAY_THROW_HPP_
2#define _VRAY_THROW_HPP_
3
4#include <cstring>
5#include <string>
6#include "_vraysdk_utils.hpp"
7
8namespace VRay {
10 std::string msg;
11
12 public:
13 explicit VRayException(const std::string& msg) : msg(msg) { }
14 explicit VRayException() : msg("Unknown V-Ray exception.") { }
15
16 const char* what() const {
17 return msg.c_str();
18 }
19
20 std::string toString() const {
21 return msg;
22 }
23 };
24
26 struct InitErr : public VRayException {
27 explicit InitErr(const std::string& msg) : VRayException(msg) { }
28 explicit InitErr() : VRayException("Initialization error.") { }
29 };
30
33 LicenseError::VRLAuthError appSDKError;
34 LicenseError::RenderNodeErr renderNodeError;
35 explicit InstantiationErr(const std::string& msg, LicenseError::VRLAuthError appSDK = LicenseError::vrlauth_noError, LicenseError::RenderNodeErr renderNode = 0) : VRayException(msg), appSDKError(appSDK), renderNodeError(renderNode) { }
36 explicit InstantiationErr() : VRayException("Instantiation error.") { }
37 };
38
39 struct FileReadErr : public VRayException {
40 explicit FileReadErr(const std::string& msg) : VRayException(msg) { }
41 explicit FileReadErr() : VRayException("File reading error or file not found.") { }
42 };
43
46 explicit PluginUnavailableErr(const std::string& msg) : VRayException(msg) { }
47 explicit PluginUnavailableErr() : VRayException("No such plugin error.") { }
48 };
49
52 explicit InvalidRenderElementErr(const std::string& msg) : VRayException(msg) { }
53 explicit InvalidRenderElementErr() : VRayException("Invalid Render element.") { }
54 };
55
57 struct InvalidTypeErr : public VRayException {
58 explicit InvalidTypeErr(const std::string& msg) : VRayException(msg) { }
59 explicit InvalidTypeErr() : VRayException("Invalid type.") { }
60 };
61
63 explicit InvalidListTypeErr(const std::string& msg) : InvalidTypeErr(msg) { }
64 explicit InvalidListTypeErr() : InvalidTypeErr("Invalid list type.") { }
65 };
66
68 struct VFBLayerErr : public VRayException {
69 explicit VFBLayerErr(const std::string& msg) : VRayException(msg) {}
70 explicit VFBLayerErr() : VRayException("Unknown VFB Layer exception.") {}
71 };
72
75 explicit VFBLayerManagerErr(const std::string& msg) : VRayException(msg) {}
76 explicit VFBLayerManagerErr() : VRayException("Unknown VFB Layer Manager exception.") {}
77 };
78
81 explicit VFBHistoryManagerErr(const std::string& msg) : VRayException(msg) {}
82 explicit VFBHistoryManagerErr() : VRayException("Unknown VFB History Manager exception.") {}
83 };
84
87 explicit NotSupportedErr(const std::string& msg) : VRayException(msg) {}
88 explicit NotSupportedErr() : VRayException("Not supported error.") {}
89 };
90}
91
92#endif
Definition: vraythrow.hpp:9
Definition: vraythrow.hpp:39
This is thrown when loading the VRaySDKLibrary dynamic library fails.
Definition: vraythrow.hpp:26
This is thrown when a renderer instance can't be created. This is usually due to a license issue.
Definition: vraythrow.hpp:32
Definition: vraythrow.hpp:62
This is thrown when a plugin passed to the render element API is not really a render element plugin.
Definition: vraythrow.hpp:51
This is thrown when an invalid type conversion/interpretation is attempted.
Definition: vraythrow.hpp:57
This is thrown when unsupported function is called, e.g. DR1 function in DR2 build.
Definition: vraythrow.hpp:86
This is thrown when a plugin class is not available. The DLL may be missing or not on the path.
Definition: vraythrow.hpp:45
This is thrown when an error occurs while proccesing VFB history manipulations.
Definition: vraythrow.hpp:80
This is thrown when an error occurs while proccesing VFB per-layer manipulations.
Definition: vraythrow.hpp:68
This is thrown when an error occurs while proccesing VFB layer manager (top-level) manipulations.
Definition: vraythrow.hpp:74