@@ -30,8 +30,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3030#ifndef INCLUDED_OCIO_OPENCOLORIO_H
3131#define INCLUDED_OCIO_OPENCOLORIO_H
3232
33- #include < stdexcept >
33+ #include < exception >
3434#include < iosfwd>
35+ #include < string>
3536#include < cstddef>
3637
3738#include " OpenColorABI.h"
@@ -84,15 +85,32 @@ OCIO_NAMESPACE_ENTER
8485 //
8586 // .. warning::
8687 // All functions in the Config class can potentially throw this exception.
87- class OCIOEXPORT Exception : public std::runtime_error
88+ class OCIOEXPORT Exception : public std::exception
8889 {
8990 public:
9091 // !cpp:function:: Constructor that takes a string as the exception message.
9192 Exception (const char *) throw ();
92- // !cpp:function:: Constructor that takes an existing exception.
93+ // !cpp:function:: Constructor that takes an exception pointer .
9394 Exception (const Exception&) throw ();
94- // !cpp:function:: Destructor
95+ // !cpp:function:: Constructor that takes an exception pointer and returns an exception pointer (???).
96+ Exception& operator =(const Exception&) throw ();
97+ // !cpp:function::
9598 virtual ~Exception () throw ();
99+ // !cpp:function::
100+ virtual const char * what () const throw();
101+
102+ private:
103+ // Add pragma warnings, STL member is private and not consumed by client of DLL
104+ #ifdef _WIN32
105+ #pragma warning(push)
106+ #pragma warning(disable:4251)
107+ #endif // _WIN32
108+
109+ std::string msg_;
110+
111+ #ifdef _WIN32
112+ #pragma warning(pop)
113+ #endif // _WIN32
96114 };
97115
98116 // !cpp:class:: An exception class for errors detected at
@@ -191,6 +209,7 @@ OCIO_NAMESPACE_ENTER
191209 // See :ref:`developers-usageexamples`
192210
193211 // !cpp:function:: Get the current configuration.
212+
194213 extern OCIOEXPORT ConstConfigRcPtr GetCurrentConfig ();
195214
196215 // !cpp:function:: Set the current configuration. This will then store a copy of the specified config.
@@ -210,9 +229,9 @@ OCIO_NAMESPACE_ENTER
210229
211230 // !cpp:function:: Constructor a default empty configuration.
212231 static ConfigRcPtr Create ();
213- // !cpp:function:: Constructor a configuration using the SYNCOLOR environment variable.
232+ // !cpp:function:: Constructor a configuration using the OCIO environmnet variable.
214233 static ConstConfigRcPtr CreateFromEnv ();
215- // !cpp:function:: Constructor a configuration using specific config file.
234+ // !cpp:function:: Constructor a configuration using a specific config file.
216235 static ConstConfigRcPtr CreateFromFile (const char * filename);
217236 // !cpp:function::
218237 static ConstConfigRcPtr CreateFromStream (std::istream & istream);
@@ -1151,7 +1170,7 @@ OCIO_NAMESPACE_ENTER
11511170 // !cpp:function::
11521171 GpuLanguage getLanguage () const ;
11531172
1154- // !cpp:function:: Set the function name of the shader program
1173+ // !cpp:function:: Set the function name of the shader program
11551174 void setFunctionName (const char * name);
11561175 // !cpp:function::
11571176 const char * getFunctionName () const ;
0 commit comments